🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Frederick Herrmann Fri, 22 Jan 1993 06:08
#pragma implementation
#692
Author: Frederick Herrmann
Date: Fri, 22 Jan 1993 06:08
18 lines
1173 bytes
The message:
		 `#pragma implementation' can only appear at top-level

is generated if the #pragma appears after a #line.  That makes sense
most of the time, but is causing me some problems now because I want to
put the pragma in the declaration section of bison deck.  Bison puts a
#line control right at the top of the file.

Of course, I can run bison -l and suppress all the #lines, but this
makes the compiler messages more confusing.

Since bison already has all the #ifdef __cplusplus conditionals in the
parser, I figured somebody might have run into this before and have a
suggestion.  Other than this, bison output seems to work fine with
c++.

				- Fritz
				  fritz@mtl.mit.edu
Re: #pragma implementation
#694
Author: Joe Buck
Date: Fri, 22 Jan 1993 20:33
19 lines
1202 bytes
In article <1993Jan22.060851.21068@athena.mit.edu> fritz@mtl.mit.edu (Frederick Herrmann) writes:
>The message:
>		 `#pragma implementation' can only appear at top-level
>
>is generated if the #pragma appears after a #line.  That makes sense
>most of the time, but is causing me some problems now because I want to
>put the pragma in the declaration section of bison deck.  Bison puts a
>#line control right at the top of the file.

You can avoid the problem by realizing that #pragma implementation
is not needed at all.  That is, if the file foo.C or foo.cc includes
foo.h, and foo.h has a #pragma interface, the effect is exactly the
same as if foo.C had a #pragma implementation, even though it does
not.



--
Joe Buck	jbuck@ohm.berkeley.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads