diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-09 16:08:42 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-09 16:08:42 +0000 |
commit | 721e9705b7085f7902de764b6daf5acee2e8c0fe (patch) | |
tree | 20db70a3cd343042fa4941b4885b6d97190834a7 /libcpp/files.c | |
parent | 543725f3e0125e211ea53f275146ca2de3101cc1 (diff) | |
download | gcc-721e9705b7085f7902de764b6daf5acee2e8c0fe.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158169 138bc75d-0d04-0410-961f-82ee72b054a4
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 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) { |