Files
Tom de Vries f1e14eee66 [gdb/build] Fix build for gcc < 11
When building trunk on openSUSE Leap 15.3 with system gcc 7.5.0, I run into:
...
In file included from ../bfd/bfd.h:46:0,
                 from gdb/defs.h:37,
                 from gdb/debuginfod-support.c:19:
gdb/debuginfod-support.c: In function ‘bool debuginfod_is_enabled()’:
gdb/../include/diagnostics.h:42:3: error: unknown option after \
  ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
   _Pragma (DIAGNOSTIC_STRINGIFY (GCC diagnostic ignored option))
   ^
gdb/../include/diagnostics.h:80:3: note: in expansion of macro \
  ‘DIAGNOSTIC_IGNORE’
   DIAGNOSTIC_IGNORE ("-Wstringop-overread")
   ^~~~~~~~~~~~~~~~~
gdb/debuginfod-support.c:201:4: note: in expansion of macro \
  ‘DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD’
    DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD
    ^
...

The problem is that the warning -Wstringop-overread has been introduced for
gcc 11, and we can only tell gcc to ignore if it knows about it.

Fix this by guarding the DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD definition in
diagnostics.c with '#if __GNUC__ >= 11'.

Tested on x86_64-linux, by completing a build.
2022-06-15 09:03:03 +02:00
..
2022-05-27 22:08:59 +09:30
2022-06-08 21:33:00 +09:30
2022-05-31 21:14:00 +09:30
2022-05-20 16:11:25 +09:30
2016-01-01 22:59:17 +10:30
2017-01-02 13:55:05 +10:30
2018-01-03 17:49:42 +10:30
2019-01-01 21:25:40 +10:30
2020-01-01 18:12:08 +10:30
2021-01-01 10:31:02 +10:30
2012-12-10 12:48:03 +00:00
2022-03-11 08:58:31 +00:00
2022-05-31 21:14:00 +09:30
2022-05-13 16:43:15 +09:30
2022-05-10 11:21:37 +09:30
2022-03-11 08:58:31 +00:00
2022-03-11 08:58:31 +00:00
2022-05-13 16:43:15 +09:30
2011-07-25 17:11:48 +00:00