c++/4920: c++ 3.0.2 Class undeclared compile problem

May, Mark mamay@enterasys.com
Mon Nov 12 00:09:00 GMT 2001


>Number:         4920
>Category:       c++
>Synopsis:       c++ 3.0.2 Class undeclared compile problem
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 21 07:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mark May
>Release:        3.0.2
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: SunOS sponge 5.7 Generic sun4u sparc SUNW,Ultra-2
>Description:
g++ fails to compile when I add bitset even though the code is
correct.
 
        NOTE: The ".ii" file is available but not included here.
 
        g++ -g -Wall -o str_bit_test str_bit_test.cxx
str_bit_test.cxx: In function `int main()':
str_bit_test.cxx:18: `bitset' undeclared (first use this function)
str_bit_test.cxx:18: (Each undeclared identifier is reported only once for
each
   function it appears in.)
str_bit_test.cxx:18: `str_bits' undeclared (first use this function)
make: *** [str_bit_test] Error 1
gcc version:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/specs
Configured with: ../configure --with-as=/usr/local/bin/as
--with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 3.0.2
 

The make error:
g++ -g -Wall -o str_bit_test str_bit_test.cxx
str_bit_test.cxx: In function `int main()':
str_bit_test.cxx:18: `bitset' undeclared (first use this function)
str_bit_test.cxx:18: (Each undeclared identifier is reported only once for
each 
   function it appears in.)
str_bit_test.cxx:18: `str_bits' undeclared (first use this function)
make: *** [str_bit_test] Error 1
 
g++ with -save-temps:
sponge:mamay> g++ -v -save-temps -g -Wall -o str_bit_test str_bit_test.cxx
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/specs
Configured with: ../configure --with-as=/usr/local/bin/as
--with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 3.0.2
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/cpp0 -lang-c++
-D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v
-D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=2 -Dsparc -Dsun -Dunix
-D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4
-D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__
-D__STDC_HOSTED__=1 -Wall -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1
-D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc
-Amachine=sparc str_bit_test.cxx str_bit_test.ii
GNU CPP version 3.0.2 (cpplib) (sparc)
ignoring nonexistent directory "/usr/local/sparc-sun-solaris2.7/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/sparc-sun-solaris2.7
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/cc1plus -fpreprocessed
str_bit_test.ii -quiet -dumpbase str_bit_test.cxx -g -Wall -version -o
str_bit_test.s
GNU CPP version 3.0.2 (cpplib) (sparc)
GNU C++ version 3.0.2 (sparc-sun-solaris2.7)
        compiled by GNU C version 3.0.2.
str_bit_test.cxx: In function `int main()':
str_bit_test.cxx:18: `bitset' undeclared (first use this function)
str_bit_test.cxx:18: (Each undeclared identifier is reported only once for
each 
   function it appears in.)
str_bit_test.cxx:18: `str_bits' undeclared (first use this function)
 
>How-To-Repeat:
g++ -g -Wall -o str_bit_test str_bit_test.cxx
>Fix:
Unknown

 

Mark May 

ASIC Verification Engineer, ASIC Development  
Enterasys Networks
Phone:  978-684-1237 
FAX:     978-684-1499
Cell:      
Email:   mamay@enterasys.com <mailto:mamay@enterasys.com> 

www:    http://www.enterasys.com <http://www.enterasys.com/> 
  <http://www.enterasys.com/images/logo2.gif> 

 

------_=_NextPart_001_01C1729D.44D0A180
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>>Submitter-Id:  
net<BR>>Originator:    Mark May<BR>>Organization:  
<organization of PR author (multiple lines)><BR>>Confidential:  
no<BR>>Synopsis: c++ 3.0.2 Class undeclared compile problem<BR>>Severity: 
critical<BR>>Priority: medium <BR>>Category: c++<BR>>Class: 
rejects-legal <BR>>Release:       
3.0.2<BR>>Environment:<SPAN class=096524014-21112001> </SPAN>System: SunOS 
sponge 5.7 Generic sun4u sparc SUNW,Ultra-2<BR><SPAN 
class=096524014-21112001>></SPAN>Architecture: sun4</FONT><FONT face=Arial 
size=2><BR>host: sparc-sun-solaris2.7<BR>build: sparc-sun-solaris2.7<BR>target: 
sparc-sun-solaris2.7<BR>configured with: ../configure 
--with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld<BR>>Description: g++ 
fails to compile when I add bitset even though the code is correct.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>        NOTE: 
The ".ii" file is available but not included here.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>        g++ -g 
-Wall -o str_bit_test str_bit_test.cxx<BR>str_bit_test.cxx: In function `int 
main()':<BR>str_bit_test.cxx:18: `bitset' undeclared (first use this 
function)<BR>str_bit_test.cxx:18: (Each undeclared identifier is reported only 
once for each<BR>   function it appears in.)<BR>str_bit_test.cxx:18: 
`str_bits' undeclared (first use this function)<BR>make: *** [str_bit_test] 
Error 1<BR>gcc version:<BR>Reading specs from 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/specs<BR>Configured with: 
../configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld<BR>Thread 
model: posix<BR>gcc version 3.0.2</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT><BR><FONT face=Arial size=2>The make 
error:<BR>g++ -g -Wall -o str_bit_test str_bit_test.cxx<BR>str_bit_test.cxx: In 
function `int main()':<BR>str_bit_test.cxx:18: `bitset' undeclared (first use 
this function)<BR>str_bit_test.cxx:18: (Each undeclared identifier is reported 
only once for each <BR>   function it appears 
in.)<BR>str_bit_test.cxx:18: `str_bits' undeclared (first use this 
function)<BR>make: *** [str_bit_test] Error 1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>g++ with -save-temps:<BR>sponge:mamay> g++ -v 
-save-temps -g -Wall -o str_bit_test str_bit_test.cxx<BR>Reading specs from 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/specs<BR>Configured with: 
../configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld<BR>Thread 
model: posix<BR>gcc version 
3.0.2<BR> /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/cpp0 -lang-c++ 
-D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v 
-D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=2 -Dsparc -Dsun -Dunix 
-D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 
-D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ 
-D__STDC_HOSTED__=1 -Wall -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 
-D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc 
-Amachine=sparc str_bit_test.cxx str_bit_test.ii<BR>GNU CPP version 3.0.2 
(cpplib) (sparc)<BR>ignoring nonexistent directory 
"/usr/local/sparc-sun-solaris2.7/include"<BR>#include "..." search starts 
here:<BR>#include <...> search starts 
here:<BR> /usr/local/include/g++-v3<BR> /usr/local/include/g++-v3/sparc-sun-solaris2.7<BR> /usr/local/include/g++-v3/backward<BR> /usr/local/include<BR> /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/include<BR> /usr/include<BR>End 
of search 
list.<BR> /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0.2/cc1plus 
-fpreprocessed str_bit_test.ii -quiet -dumpbase str_bit_test.cxx -g -Wall 
-version -o str_bit_test.s<BR>GNU CPP version 3.0.2 (cpplib) (sparc)<BR>GNU C++ 
version 3.0.2 
(sparc-sun-solaris2.7)<BR>        compiled by 
GNU C version 3.0.2.<BR>str_bit_test.cxx: In function `int 
main()':<BR>str_bit_test.cxx:18: `bitset' undeclared (first use this 
function)<BR>str_bit_test.cxx:18: (Each undeclared identifier is reported only 
once for each <BR>   function it appears in.)<BR>str_bit_test.cxx:18: 
`str_bits' undeclared (first use this function)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>>How-To-Repeat: g++ -g -Wall -o str_bit_test 
str_bit_test.cxx<BR>>Fix: Unknown<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV class=Section1><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT 
face=Arial></FONT>
<P class=MsoNormal align=left><FONT face=Arial></FONT><FONT 
face=Arial></FONT><FONT face=Arial></FONT><BR clear=all><SPAN 
style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">Mark 
May </SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">ASIC <FONT face=Arial 
size=2>Verification</FONT> Engineer, ASIC Development  </SPAN><BR><SPAN 
style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">Enterasys 
Networks<BR>Phone:  978-684-1237 <BR>FAX:     
978-684-1499<BR>Cell:      <BR>Email:   <A 
href="mailto:mamay@enterasys.com">mamay@enterasys.com</A></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Verdana">www:    
<A href="http://www.enterasys.com/">http://www.enterasys.com</A><BR></SPAN><IMG 
height=46 alt="" src="http://www.enterasys.com/images/logo2.gif" width=136 
border=0></P></DIV>
<DIV> </DIV></BODY></HTML>

------_=_NextPart_001_01C1729D.44D0A180--
>Release-Note:
>Audit-Trail:
>Unformatted:
 This message is in MIME format. Since your mail reader does not understand
 this format, some or all of this message may not be legible.
 
 ------_=_NextPart_001_01C1729D.44D0A180
 Content-Type: text/plain
 
 >Architecture: sun4
 host: sparc-sun-solaris2.7
 build: sparc-sun-solaris2.7
 target: sparc-sun-solaris2.7
 configured with: ../configure --with-as=/usr/local/bin/as
 --with-ld=/usr/local/bin/ld



More information about the Gcc-bugs mailing list