diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 5 | ||||
-rw-r--r-- | libcpp/files.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 7762099dd12..24838d3cd10 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org> + + PR cpp/43195 + * files.c (report_missing_guard): Test for #pragma once. + 2010-04-07 Simon Baldwin <simonb@google.com> * directives.c (do_diagnostic): Add warning reason argument, diff --git a/libcpp/files.c b/libcpp/files.c index ecf9d6c4651..be39db9a94c 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) { |