This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: gcc-3.2.3 with -ansi and 32bit gcc-3.2.3 binaries
- From: "Crescioli, Phil" <Phil dot Crescioli at gd-ais dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Cc: <lrtaylor at micron dot com>,"Crescioli, Phil" <Phil dot Crescioli at gd-ais dot com>
- Date: Tue, 24 Feb 2004 16:15:24 -0500
- Subject: RE: gcc-3.2.3 with -ansi and 32bit gcc-3.2.3 binaries
All,
I think Lyle has in directly answered my question, so I'm posting this
for clarity. It turns out I don't necessarily need to use -ansi, but I
do need to be compliant with the 14882:1998 ISO C++ Programming Language
Spec. This was a misunderstanding of how I interpreted my projects
requirements I think.
So, after reading GCC online docs about libstdc++
(http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html), and GCC
commands
info(http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C%20Dialec
t%20Options ), if I use the command line option:
g++ -std=c++98 -pedantic -o proc proc.cpp
all compiles and runs fine, and I have told the g++ compiler to adhere
to the 14882:1998 ANSI/ISO/IEC C++ Programming Language Specification.
So I don't need -ansi after all. I think this will work for now.
However, please keep in mind that for some reason the snippet of code I
posted in this thread will not build with "g++ -ansi -o proc proc.cpp"
for some reason of which I don't need to dive into right now since I
have found another way.
Phil
-----Original Message-----
From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
Sent: Friday, February 20, 2004 4:37 PM
To: Crescioli, Phil; gcc-help@gcc.gnu.org
Subject: RE: gcc-3.2.3 with -ansi and 32bit gcc-3.2.3 binaries
Phil,
In what way do you need to be ANSI compliant? That is, do you need to
be compliant to ANSI C or ANSI C++? The -ansi option only applies to
C...
Cheers,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Crescioli, Phil
Sent: Friday, February 20, 2004 2:33 PM
To: gcc-help@gcc.gnu.org
Subject: gcc-3.2.3 with -ansi and 32bit gcc-3.2.3 binaries
All,
My Platform is Sun Ultra Sparc 3e with Solaris 8 and GCC3.2.3.
I must be ansi/iso compliant and use -ansi when compiling.