From 71c4681d83fa439d3c618a460361936029a79887 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Tue, 2 Jun 1992 21:09:25 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r1140 --- gcc/cccp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.30.2