From acf601aefd44b7c2615c78408b32e862212d34ef Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 7 Feb 2014 17:42:24 +0100 Subject: re PR preprocessor/56824 (pragma GCC diagnostic push/pop fail with GCC diagnostic ignored "-Waggregate-return") PR preprocessor/56824 * line-map.c (get_combined_adhoc_loc, linemap_get_expansion_line, linemap_get_expansion_filename, linemap_location_in_system_header_p, linemap_location_from_macro_expansion_p, linemap_macro_loc_to_spelling_point, linemap_macro_loc_to_def_point, linemap_macro_loc_to_exp_point, linemap_expand_location): Fix formatting. (linemap_compare_locations): Look through adhoc locations for both l0 and l1. * gcc.dg/pr56824.c: New test. From-SVN: r207606 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr56824.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr56824.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e1ccc2d..a50fa4b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-02-07 Jakub Jelinek + + PR preprocessor/56824 + * gcc.dg/pr56824.c: New test. + 2014-02-07 Andreas Krebbel * gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte diff --git a/gcc/testsuite/gcc.dg/pr56824.c b/gcc/testsuite/gcc.dg/pr56824.c new file mode 100644 index 0000000..d682d0a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr56824.c @@ -0,0 +1,18 @@ +/* PR preprocessor/56824 */ +/* { dg-do compile } */ +/* { dg-options "-Waggregate-return" } */ + +struct S { int i; }; +struct S foo (void); + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggregate-return" + +int +main () +{ + foo (); + return 0; +} + +#pragma GCC diagnostic pop -- cgit v1.1