diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 19:12:14 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 19:12:14 +0000 |
commit | 408c2285f14b7cb4ebcbee38be30b9cf177d0afa (patch) | |
tree | b8d0f8b842935bf3445c936be9b262e9c8ec3c96 /gcc/testsuite/gcc.dg/cpp/mi8.c | |
parent | 19f93b6270249e3a0a0e48011f8041fc619f32ab (diff) | |
download | gcc-408c2285f14b7cb4ebcbee38be30b9cf177d0afa.tar.gz |
PR preprocessor/36649
* files.c (struct report_missing_guard_data): New type.
(report_missing_guard): Put paths into an array instead of printing
them right away. Return 1 rather than 0.
(report_missing_guard_cmp): New function.
(_cpp_report_missing_guards): Sort and print paths gathered by
report_missing_guard callback.
* gcc.dg/pch/cpp-3.hs: Add include guards.
* gcc.dg/pch/cpp-3a.h: Likewise.
* gcc.dg/pch/cpp-3b.h: Likewise.
* gcc.dg/cpp/mi8.c: New test.
* gcc.dg/cpp/mi8a.h: New file.
* gcc.dg/cpp/mi8b.h: New file.
* gcc.dg/cpp/mi8c.h: New file.
* gcc.dg/cpp/mi8d.h: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/mi8.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/mi8.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/mi8.c b/gcc/testsuite/gcc.dg/cpp/mi8.c new file mode 100644 index 00000000000..1999918dea4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/mi8.c @@ -0,0 +1,8 @@ +/* Test multiple include guards suggestions. */ + +/* { dg-do preprocess } + { dg-options "-H" } + { dg-message "mi8a\.h\n\[^\n\]*mi8c\.h\n\[^\n\]*mi8b\.h\n\[^\n\]*mi8d\.h\nMultiple include guards may be useful for:\n\[^\n\]*mi8a\.h\n\[^\n\]*mi8d\.h\n" "" { target *-*-* } 0 } */ + +#include "mi8a.h" +#include "mi8b.h" |