summaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-06-02 21:09:25 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-06-02 21:09:25 +0000
commit4c991b87718740352283b5c9bf928107d793ce9b (patch)
treef73d49a65c75d1d92c88bfba9d99c3d76ada6a21 /gcc/cccp.c
parent207d679c60493a7d3689ccaf22172e1aeec46d8e (diff)
downloadgcc-4c991b87718740352283b5c9bf928107d793ce9b.tar.gz
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index f0ce06ffacb..0dbf5f866f4 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -5838,7 +5838,10 @@ do_pragma (buf, limit)
while (*buf == ' ' || *buf == '\t')
buf++;
if (!strncmp (buf, "once", 4)) {
- warning ("`#pragma once' is obsolete");
+ /* Allow #pragma once in system headers, since that's not the user's
+ fault. */
+ if (!instack[indepth].system_header_p)
+ warning ("`#pragma once' is obsolete");
do_once ();
}
return 0;