On 1/8/08, Ismail Dönmez <[EMAIL PROTECTED]> wrote:
> Tuesday 08 January 2008 23:34:13 tarihinde Joe Buck şunları yazmıştı:
> > There's certainly an argument that this change is ill-advised. However,
> > your statements in the last paragraph aren't true: most quality open
> > source projects have a "no warnings" rule (or at least try to eliminate
> > warnings), and most programmers know about #undef.
>
> Interesting assumption because knowing about #undef doesn't cut it because
> autoconf will happily #define without ifndef etc.

The other thing is before this change, the C++ front-end was
inconstaint with the preprocessor and now it is constaint.  So adding
-pedantic-errors made those warnings into errors while doing
-pedantic-errors -fpermissive will still kept them as errors.
As shown by:

[EMAIL PROTECTED]:~$ ~/x86-linux-4.0.2/bin/gcc t.cc -pedantic-errors 
-fpermissive
t.cc:2:1: error: "a" redefined
t.cc:1:1: error: this is the location of the previous definition
[EMAIL PROTECTED]:~$ ~/x86-linux-4.0.2/bin/gcc t.cc
t.cc:2:1: warning: "a" redefined
t.cc:1:1: warning: this is the location of the previous definition
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
collect2: ld returned 1 exit status

Thanks,
Andrew Pinski

Reply via email to