public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3363: Missing stl_config.h inclusion in stl_alloc.h
@ 2001-06-22  6:26 Grant Gould
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Gould @ 2001-06-22  6:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: gildea

>Number:         3363
>Category:       c++
>Synopsis:       stl_alloc.h does not include stl_config.h, causing parse errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 22 06:26:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Grant Gould
>Release:        3.0
>Organization:
Comverse Voice Solutions
>Environment:
System: SunOS curley.intouchsys.com 5.7 Generic_106541-15 sun4m sparc SUNW,SPARCstation-5
Architecture: sun4

	
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../gcc-3.0/configure 
>Description:
stl_alloc.h does not #include <bits/stl_config.h> and as a result does
not have the macro __STL_VOLATILE available to it.  This causes a
parse error at compile time for legal code which uses the STL.

>How-To-Repeat:

iostream.h is a good example of a header whose inclusion triggers the
problem.  With a newly-bootstrapped gcc, I compile hworld2.cpp:

#include <stdio.h>
#include <iostream.h>
int main(int argc, char **argv)
{
printf("Hello, World!\n");
}

As with many parse problems I get a huge pile of errors, the first and
only relevant of which is:

In file included from /usr/local/include/g++-v3/bits/std_memory.h:21,
                 from /usr/local/include/g++-v3/bits/std_string.h:43,
                 from /usr/local/include/g++-v3/bits/localefwd.h:42,
                 from /usr/local/include/g++-v3/bits/std_ios.h:43,
                 from /usr/local/include/g++-v3/bits/std_ostream.h:39,
                 from /usr/local/include/g++-v3/bits/std_iostream.h:40,
                 from /usr/local/include/g++-v3/backward/iostream.h:32,
                 from hworld2.cpp:2:
/usr/local/include/g++-v3/bits/stl_alloc.h:259: parse error before `[' token

(I get one of these for every appearance of the __STL_VOLATILE macro in
stl_alloc.h)

>Fix:

This is trivially fixed by adding:

#include <bits/stl_config.h>

near the beginning of stl_alloc.h; with this change, my hworld2.cpp
compiles and runs perfectly.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/3363: Missing stl_config.h inclusion in stl_alloc.h
@ 2001-06-22  9:16 Grant Gould
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Gould @ 2001-06-22  9:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/3363; it has been noted by GNATS.

From: Grant Gould <ggould@alum.mit.edu>
To: gcc-gnats@gcc.gnu.org
Cc: gildea@intouchsys.com
Subject: Re: c++/3363: Missing stl_config.h inclusion in stl_alloc.h
Date: 22 Jun 2001 12:10:27 -0400

 Grant Gould <ggould@intouchsys.com> writes:
 
 > >Number:         3363
 > >Category:       c++
 > >Synopsis:       stl_alloc.h does not include stl_config.h, causing parse errors
 
 Surprisingly, when I deleted /usr/local/include/g++-v3 and redid the make
 install, this went away.  I can only assume that somehow some old file
 left in there by a previous gcc installation had persisted.
 
 If this is a problem at all, it's in make install which should clean
 up the remains of previous versions.
  --Grant


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-06-22  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-22  6:26 c++/3363: Missing stl_config.h inclusion in stl_alloc.h Grant Gould
2001-06-22  9:16 Grant Gould

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).