🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53301

Re: GCC 2 & Pragma once in stream.h (for example)

#53301
From: Skip Gilbrech
Date: Wed, 26 Feb 1992 07:27
31 lines
1670 bytes
In article <9202232146.PN01084@LL.MIT.EDU> marshall@ll.mit.edu (Hunter Marshall) writes:

>I built gcc 2 on a sparc, sunos 4.1.1. Now it objects (vociferously)
>to libg++-1.39's use of "#pragma once" (in the headers) , and it seems 
>unable to resolve some symbols (it got worse after I recompiled libg++).

I don't know why it's suddenly become obsolete, and it would certainly
be nice to have some way to get it to shut up without messing with
the source.  "#pragma once" still works, by the way.

Here's the code (from cccp.c), commenting out the warning would work:

static int
do_pragma (buf, limit)
     U_CHAR *buf, *limit;
{
  while (*buf == ' ' || *buf == '\t')
    buf++;
  if (!strncmp (buf, "once", 4)) {
    warning ("`#pragma once' is obsolete");
    do_once ();
  }
  return 0;
}

-Skip
-- 
Skip Gilbrech			email:	skip@fsg.com
Fusion Systems Group			uupsi!fsg!skip
225 Broadway, 24th Floor		uupsi!skipnyc!skip
New York, NY 10007		phones:	212-285-8001 (work)
Technical Details
Message-ID: <SKIP.92Feb26022706@skipsun.skipnyc>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!fsg!skipsun!skipsun!skip
References: <9202232146.PN01084@LL.MIT.EDU>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,83be6a6a43a0614c
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-02-26 05:47:58 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!fsg!skipsun!skipsun!skip
From: skip@skipnyc (Skip Gilbrech)
Subject: Re: GCC 2 & Pragma once in stream.h (for example)
In-Reply-To: marshall@ll.mit.edu's message of Sun, 23 Feb 92 21:46:18 -0500
Message-ID: <SKIP.92Feb26022706@skipsun.skipnyc>
Lines: 26
Sender: skip@skipnyc (Skip Gilbrech)
Organization: Fusion Systems Group, New York City
References: <9202232146.PN01084@LL.MIT.EDU>
Distribution: gnu
Date: 26 Feb 92 07:27:06 GMT