gcc-3.3 issues
Michael Nottebrock
michaelnottebrock at gmx.net
Fri Jul 18 01:33:06 PDT 2003
On Thursday 17 July 2003 22:50, Mikhail Teterin wrote:
> Here is how to reproduce the problem, Michael is talking about. Simply
> try to build the kdelibs3 (or kdegraphic3, or kdenetwork3) port.
I've tried to come up with a less obscure testcase:
#include <string>
#include <iostream>
using namespace std;
int main ()
{
string astring="Hello World";
cout << astring << endl;
}
Now, if I compile this on 5.1-RELEASE with
c++ -Wnon-virtual-dtor -Wno-long-long -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -DNDEBUG -DNO_DEBUG -O -pipe
-mcpu=pentiumpro -fno-check-new -L/usr/local/lib -I/usr/local/include
-I/usr/local/include -I/usr/X11R6/include -D_GETOPT_H -o helloworld
helloworld.cc
I get a plethora of warnings:
In file included from /usr/include/g++/memory:55,
from /usr/include/g++/string:48,
from helloworld.cc:1:
/usr/include/g++/bits/stl_alloc.h:979: warning: ISO C++ forbids the use of `
extern' on explicit instantiations
/usr/include/g++/bits/stl_alloc.h:980: warning: ISO C++ forbids the use of `
extern' on explicit instantiations
/usr/include/g++/bits/stl_alloc.h:981: warning: ISO C++ forbids the use of `
extern' on explicit instantiations
/usr/include/g++/bits/stl_alloc.h:981: warning: ISO C++ forbids the use of `
extern' on explicit instantiations
/usr/include/g++/bits/stl_alloc.h:981: warning: ISO C++ forbids the use of `
extern' on explicit instantiations
[and many, many more]
but it will compile. If I omit -pedantic, none of these warnings occur. The
thing is, in -CURRENT with the new gcc, all these warnings for some reason
become errors. The other thing is, if I try this with with a ports-compiled
g++32 on 4-STABLE, I don't get warnings at all, no matter if -pedantic is
specified or not.
So here's the questions for the experts:
- Why errors instead of warnings?
- Why do gcc's own bits seem to not conform to some kind of standard that it
tries to adhere to in 5-CURRENT but not in 4-STABLE?
- Who's to blame?
--
Michael Nottebrock \ KDE on FreeBSD \ ,ww
\ --- \ ,wWWCybaWW_)
\ http://freebsd.kde.org \ `WSheepW' free
\ II II node
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030718/bafadf6f/attachment.bin
More information about the freebsd-current
mailing list