diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2010-04-09 16:08:42 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2010-04-09 16:08:42 +0000 |
commit | d8a12e847827c1c7a175bf33f3a60b0d0066ef85 (patch) | |
tree | 20db70a3cd343042fa4941b4885b6d97190834a7 /libcpp/files.c | |
parent | d0b8780d9f4b5b5b98063995671e44d01712fcf9 (diff) | |
download | gcc-d8a12e847827c1c7a175bf33f3a60b0d0066ef85.zip gcc-d8a12e847827c1c7a175bf33f3a60b0d0066ef85.tar.gz gcc-d8a12e847827c1c7a175bf33f3a60b0d0066ef85.tar.bz2 |
re PR preprocessor/43195 (#pragma once and -H)
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR cpp/43195
libcpp/
* files.c (report_missing_guard): Test for #pragma once.
testsuite/
* gcc.dg/cpp/pr43195.c: New.
* gcc.dg/cpp/pr43195.h: New.
From-SVN: r158169
Diffstat (limited to 'libcpp/files.c')
-rw-r--r-- | libcpp/files.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpp/files.c b/libcpp/files.c index ecf9d6c..be39db9 100644 --- a/libcpp/files.c +++ b/libcpp/files.c @@ -1261,7 +1261,8 @@ report_missing_guard (void **slot, void *d) _cpp_file *file = entry->u.file; /* We don't want MI guard advice for the main file. */ - if (file->cmacro == NULL && file->stack_count == 1 && !file->main_file) + if (!file->once_only && file->cmacro == NULL + && file->stack_count == 1 && !file->main_file) { if (data->paths == NULL) { |