public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure)
@ 2003-10-01 17:42 levon at movementarian dot org
2003-10-01 17:46 ` [Bug c++/12479] " pinskia at gcc dot gnu dot org
` (21 more replies)
0 siblings, 22 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-01 17:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
Summary: superfluous colon with -pedantic gives error not present
w/o -pedantic (mozilla build failure)
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: levon at movementarian dot org
CC: gcc-bugs at gcc dot gnu dot org
testcase:
[moz@lambent moz]$ cat a.cpp
extern "C" { };
[moz@lambent moz]$ /usr/local/gcc-cvs/bin/g++ -c a.cpp
[moz@lambent moz]$ /usr/local/gcc-cvs/bin/g++ -pedantic -c a.cpp
a.cpp:1: error: extra `;'
This is a regression against earlier gcc versions (gcc-3.2-7 on RH8)
Originally seen building mozilla, where /usr/include/malloc.h has the
superfluous semicolon.
gcc version 3.4 20030925
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure)
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
@ 2003-10-01 17:46 ` pinskia at gcc dot gnu dot org
2003-10-01 17:51 ` [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'" pinskia at gcc dot gnu dot org
` (20 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01 17:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-01 17:46 -------
Maybe -pedantic should not warn about system headers but the error message is correct.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
2003-10-01 17:46 ` [Bug c++/12479] " pinskia at gcc dot gnu dot org
@ 2003-10-01 17:51 ` pinskia at gcc dot gnu dot org
2003-10-01 17:58 ` levon at movementarian dot org
` (19 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01 17:51 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Keywords| |diagnostic
Summary|superfluous colon with - |System header should not
|pedantic gives error not |cause -pedantic to error
|present w/o -pedantic |about "extra `;'"
|(mozilla build failure) |
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-01 17:51 -------
I am not the one who is going to make the discussion here but the error message is correct that
the semicolon is extra (since 3.4 is more compliant this happens).
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
2003-10-01 17:46 ` [Bug c++/12479] " pinskia at gcc dot gnu dot org
2003-10-01 17:51 ` [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'" pinskia at gcc dot gnu dot org
@ 2003-10-01 17:58 ` levon at movementarian dot org
2003-10-01 18:01 ` pinskia at gcc dot gnu dot org
` (18 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-01 17:58 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From levon at movementarian dot org 2003-10-01 17:58 -------
<movement> um, should -pedantic be causing /errors/ ?
<zwol> no
<zwol> -pedantic is supposed to just enable more warnings
-pedantic is listed as a warning option. What purpose does
-pedantic-errors have if -pedantic introduces new errors ?
Furthermore, if you insist that -pedantic should fail the build,
it seems that there needs to be some fixincludes work, otherwise
GCC 3.4 g++ and -pedantic will be useless on systems as common
as Red Hat Linux 8.0
See also http://bugzilla.mozilla.org/show_bug.cgi?id=218551
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (2 preceding siblings ...)
2003-10-01 17:58 ` levon at movementarian dot org
@ 2003-10-01 18:01 ` pinskia at gcc dot gnu dot org
2003-10-01 18:06 ` levon at movementarian dot org
` (17 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01 18:01 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-01 18:01 -------
-pedantic with C++ is different than -pedantic with C, in C++ it adds errors, -pedantic-error is
really only useful in C. This has been this way for a long time but will likely stay this way forever.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (3 preceding siblings ...)
2003-10-01 18:01 ` pinskia at gcc dot gnu dot org
@ 2003-10-01 18:06 ` levon at movementarian dot org
2003-10-01 18:09 ` pinskia at gcc dot gnu dot org
` (16 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-01 18:06 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From levon at movementarian dot org 2003-10-01 18:06 -------
The manual should clarify this very odd behaviour. Currently :
`-pedantic'
Issue all the warnings demanded by strict ISO C and ISO C++;
reject all programs that use forbidden extensions, and some other
programs that do not follow ISO C and ISO C++.
does not make the behaviour clear; in particular, no such distinction
between C and C++ is made that I could see.
(Please ignore the previous comment about fixincludes - thinko)
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (4 preceding siblings ...)
2003-10-01 18:06 ` levon at movementarian dot org
@ 2003-10-01 18:09 ` pinskia at gcc dot gnu dot org
2003-10-01 18:19 ` levon at movementarian dot org
` (15 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01 18:09 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-01 18:09 -------
"reject all programs that use forbidden extensions" see that part, reject means error, in this case it
is a forbidden extension.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (5 preceding siblings ...)
2003-10-01 18:09 ` pinskia at gcc dot gnu dot org
@ 2003-10-01 18:19 ` levon at movementarian dot org
2003-10-01 18:31 ` zack at gcc dot gnu dot org
` (14 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-01 18:19 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From levon at movementarian dot org 2003-10-01 18:19 -------
I know what "reject" means. Like I said, this short phrase does not
make clear the surprising behaviour, and no mention is made of difference
between C and C++ that you state.
Additionally, the docs do not make clear if __extension__ is supposed to
work with such warnings-but-actually-errors (it doesn't, unless I'm doing
something wrong).
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (6 preceding siblings ...)
2003-10-01 18:19 ` levon at movementarian dot org
@ 2003-10-01 18:31 ` zack at gcc dot gnu dot org
2003-10-01 18:44 ` gdr at integrable-solutions dot net
` (13 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-10-01 18:31 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From zack at gcc dot gnu dot org 2003-10-01 18:31 -------
Both the documentation and the code are in error here. This has been discussed
at length on the mailing lists. -pedantic is ONLY to enable additional warnings.
Issuing hard errors for extensions is the sole province of -std=c++98 (or =c89,
or anything without "gnu" in the name).
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (7 preceding siblings ...)
2003-10-01 18:31 ` zack at gcc dot gnu dot org
@ 2003-10-01 18:44 ` gdr at integrable-solutions dot net
2003-10-01 18:46 ` gdr at integrable-solutions dot net
` (12 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-01 18:44 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-01 18:44 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"levon at movementarian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The manual should clarify this very odd behaviour. Currently :
|
| `-pedantic'
| Issue all the warnings demanded by strict ISO C and ISO C++;
| reject all programs that use forbidden extensions, and some other
| programs that do not follow ISO C and ISO C++.
|
| does not make the behaviour clear; in particular, no such distinction
| between C and C++ is made that I could see.
Probably. The -pedantic can turn pedwarns into errors. We've had
that behaviour for ages.
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (8 preceding siblings ...)
2003-10-01 18:44 ` gdr at integrable-solutions dot net
@ 2003-10-01 18:46 ` gdr at integrable-solutions dot net
2003-10-01 18:57 ` zack at gcc dot gnu dot org
` (11 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-01 18:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-01 18:46 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"zack at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Both the documentation and the code are in error here. This has been discussed
| at length on the mailing lists. -pedantic is ONLY to enable
| additional warnings.
Not in the C++ front-end. That also has been debated to death.
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (9 preceding siblings ...)
2003-10-01 18:46 ` gdr at integrable-solutions dot net
@ 2003-10-01 18:57 ` zack at gcc dot gnu dot org
2003-10-01 19:19 ` gdr at integrable-solutions dot net
` (10 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-10-01 18:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From zack at gcc dot gnu dot org 2003-10-01 18:57 -------
| Probably. The -pedantic can turn pedwarns into errors. We've had
| that behaviour for ages.
... and it is a (long-standing) bug. That's only for -pedantic-errors to do.
| Not in the C++ front-end. That also has been debated to death.
I'm not as familiar with the history there, but surely you agree that options
like -pedantic should do the same thing in all front ends.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (10 preceding siblings ...)
2003-10-01 18:57 ` zack at gcc dot gnu dot org
@ 2003-10-01 19:19 ` gdr at integrable-solutions dot net
2003-10-01 19:46 ` levon at movementarian dot org
` (9 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-01 19:19 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-01 19:19 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"zack at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| | Probably. The -pedantic can turn pedwarns into errors. We've had
| | that behaviour for ages.
|
| ... and it is a (long-standing) bug. That's only for -pedantic-errors to do.
The last time this has been discussed, my recollection is that the
intended (and actual) behaviour is that -pedantic can turn some
warnings into errors.
The reason is that by default we may be lenient about some constructs
and/or just warn. But if -pedantic then we may reject such codes because
of them violating some standard text requirements.
The latent bug is that the documentation does not reflect that
intended and actual behaviour.
| | Not in the C++ front-end. That also has been debated to death.
|
| I'm not as familiar with the history there, but surely you agree
| that options like -pedantic should do the same thing in all front ends.
I think -pedantic is front-end dependent just like -ansi.
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (11 preceding siblings ...)
2003-10-01 19:19 ` gdr at integrable-solutions dot net
@ 2003-10-01 19:46 ` levon at movementarian dot org
2003-10-01 19:53 ` gdr at integrable-solutions dot net
` (8 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-01 19:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From levon at movementarian dot org 2003-10-01 19:46 -------
> by default we may be lenient about some constructs and/or just warn.
I suppose it's "or" here. As far as I know, there is no way to get an
actual warning about this problem in current GCC. That surely can't be
a good thing ?
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (12 preceding siblings ...)
2003-10-01 19:46 ` levon at movementarian dot org
@ 2003-10-01 19:53 ` gdr at integrable-solutions dot net
2003-10-01 19:55 ` gdr at integrable-solutions dot net
` (7 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-01 19:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-01 19:53 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"levon at movementarian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| > by default we may be lenient about some constructs and/or just warn.
|
| I suppose it's "or" here. As far as I know, there is no way to get an
| actual warning about this problem in current GCC. That surely can't be
| a good thing ?
We should probably do something about system headers.
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (13 preceding siblings ...)
2003-10-01 19:53 ` gdr at integrable-solutions dot net
@ 2003-10-01 19:55 ` gdr at integrable-solutions dot net
2003-10-02 1:27 ` levon at movementarian dot org
` (6 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-01 19:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-01 19:55 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"levon at movementarian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| > by default we may be lenient about some constructs and/or just warn.
|
| I suppose it's "or" here. As far as I know, there is no way to get an
| actual warning about this problem in current GCC. That surely can't be
| a good thing ?
In the testcase you provided, nothing indicates to GCC that it is
processing a system header.
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (14 preceding siblings ...)
2003-10-01 19:55 ` gdr at integrable-solutions dot net
@ 2003-10-02 1:27 ` levon at movementarian dot org
2003-10-02 1:59 ` gdr at integrable-solutions dot net
` (5 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: levon at movementarian dot org @ 2003-10-02 1:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From levon at movementarian dot org 2003-10-02 01:27 -------
The problem was originally with /usr/include/malloc.h. Is that not a system header ?
Anyway, you didn't really answer my question in comment 13, namely whether
you consider it sensible to only allow these two states :
1) no mention at all of the problem
2) error + rejection
which is the current state of CVS HEAD.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (15 preceding siblings ...)
2003-10-02 1:27 ` levon at movementarian dot org
@ 2003-10-02 1:59 ` gdr at integrable-solutions dot net
2003-11-30 8:36 ` [Bug c++/12479] [3.4 only] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-10-02 1:59 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
------- Additional Comments From gdr at integrable-solutions dot net 2003-10-02 01:59 -------
Subject: Re: System header should not cause -pedantic to error about "extra `;'"
"levon at movementarian dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The problem was originally with /usr/include/malloc.h. Is that not a system header ?
I can't tell.
| Anyway, you didn't really answer my question in comment 13, namely whether
| you consider it sensible to only allow these two states :
|
| 1) no mention at all of the problem
| 2) error + rejection
|
| which is the current state of CVS HEAD.
I think that particular construct is harmless enough so that the error
should probably be warning in regular contexts, ignored if
-Wno-sys-headers (or whatever that option is spelled), and an error if
-pedantic (except in system headers unless -Wsys-headers).
-- Gaby
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] [3.4 only] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (16 preceding siblings ...)
2003-10-02 1:59 ` gdr at integrable-solutions dot net
@ 2003-11-30 8:36 ` pinskia at gcc dot gnu dot org
2003-12-20 4:12 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-30 8:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-30 08:36 -------
I am going to agree and maybe send a patch (do not quote me though).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-30 08:36:16
date| |
Summary|System header should not |[3.4 only] System header
|cause -pedantic to error |should not cause -pedantic
|about "extra `;'" |to error about "extra `;'"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] [3.4 only] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (17 preceding siblings ...)
2003-11-30 8:36 ` [Bug c++/12479] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2003-12-20 4:12 ` pinskia at gcc dot gnu dot org
2003-12-22 9:18 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-20 4:12 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] [3.4 only] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (18 preceding siblings ...)
2003-12-20 4:12 ` pinskia at gcc dot gnu dot org
@ 2003-12-22 9:18 ` mmitchel at gcc dot gnu dot org
2003-12-22 19:21 ` cvs-commit at gcc dot gnu dot org
2003-12-22 19:26 ` mmitchel at gcc dot gnu dot org
21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-12-22 9:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-12-22 08:18 -------
Zack is correct that G++ mishandles -pedantic. It's current behavior (with the
additional complication of -fpermissive) is neither necessary nor concistent
with the C front end.
The current situation is a way of avoiding having to go through and analyze
every "pedwarn" in G++ to decide whether to make it into:
if (pedantic) pedwarn (...)
or:
error (...)
At this point, it would probably just make sense to deprecate -fpermissive, and
make all uses of "pedwarn" in the C++ front end that are not guarded by "if
(pedantic)" into "error" calls.
Meanwhile, I will make the particular pedwarn in question conditional on
!in_system_header, which makes sense anyhow.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] [3.4 only] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (19 preceding siblings ...)
2003-12-22 9:18 ` mmitchel at gcc dot gnu dot org
@ 2003-12-22 19:21 ` cvs-commit at gcc dot gnu dot org
2003-12-22 19:26 ` mmitchel at gcc dot gnu dot org
21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-22 19:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-22 19:00 -------
Subject: Bug 12479
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-12-22 19:00:13
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/parse: semicolon1.C semicolon1.h
Log message:
PR c++/12479
* parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
pedwarn when not in a system header.
PR c++/12479
* g++.dg/parse/semicolon1.C: New test.
* g++.dg/parse/semicolon1.h: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3828&r2=1.3829
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.139&r2=1.140
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3297&r2=1.3298
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/semicolon1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/semicolon1.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/12479] [3.4 only] System header should not cause -pedantic to error about "extra `;'"
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
` (20 preceding siblings ...)
2003-12-22 19:21 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-22 19:26 ` mmitchel at gcc dot gnu dot org
21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-12-22 19:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-12-22 19:01 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2003-12-22 19:01 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 17:42 [Bug c++/12479] New: superfluous colon with -pedantic gives error not present w/o -pedantic (mozilla build failure) levon at movementarian dot org
2003-10-01 17:46 ` [Bug c++/12479] " pinskia at gcc dot gnu dot org
2003-10-01 17:51 ` [Bug c++/12479] System header should not cause -pedantic to error about "extra `;'" pinskia at gcc dot gnu dot org
2003-10-01 17:58 ` levon at movementarian dot org
2003-10-01 18:01 ` pinskia at gcc dot gnu dot org
2003-10-01 18:06 ` levon at movementarian dot org
2003-10-01 18:09 ` pinskia at gcc dot gnu dot org
2003-10-01 18:19 ` levon at movementarian dot org
2003-10-01 18:31 ` zack at gcc dot gnu dot org
2003-10-01 18:44 ` gdr at integrable-solutions dot net
2003-10-01 18:46 ` gdr at integrable-solutions dot net
2003-10-01 18:57 ` zack at gcc dot gnu dot org
2003-10-01 19:19 ` gdr at integrable-solutions dot net
2003-10-01 19:46 ` levon at movementarian dot org
2003-10-01 19:53 ` gdr at integrable-solutions dot net
2003-10-01 19:55 ` gdr at integrable-solutions dot net
2003-10-02 1:27 ` levon at movementarian dot org
2003-10-02 1:59 ` gdr at integrable-solutions dot net
2003-11-30 8:36 ` [Bug c++/12479] [3.4 only] " pinskia at gcc dot gnu dot org
2003-12-20 4:12 ` pinskia at gcc dot gnu dot org
2003-12-22 9:18 ` mmitchel at gcc dot gnu dot org
2003-12-22 19:21 ` cvs-commit at gcc dot gnu dot org
2003-12-22 19:26 ` mmitchel at gcc dot gnu dot org
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).