public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16604] New: Bad diagnostic
@ 2004-07-17 8:29 igodard at pacbell dot net
2004-07-17 8:29 ` [Bug c++/16604] " igodard at pacbell dot net
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: igodard at pacbell dot net @ 2004-07-17 8:29 UTC (permalink / raw)
To: gcc-bugs
First disgnostic (of many :-( complains:/home/ivan/ootbc/common/include/display.hh:480: error: using-declaration for non
-member at class scope
However, there's no using declaration there. The actual error is that the
sizeof argument should have been "ch", not "Ch". The diagnostic should have reported "Ch" as undefined.
Ivan
--
Summary: Bad diagnostic
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
@ 2004-07-17 8:29 ` igodard at pacbell dot net
2004-07-17 8:32 ` igodard at pacbell dot net
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: igodard at pacbell dot net @ 2004-07-17 8:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-07-17 08:29 -------
Created an attachment (id=6768)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6768&action=view)
Compiler output (-v -save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
2004-07-17 8:29 ` [Bug c++/16604] " igodard at pacbell dot net
@ 2004-07-17 8:32 ` igodard at pacbell dot net
2004-07-17 8:39 ` igodard at pacbell dot net
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: igodard at pacbell dot net @ 2004-07-17 8:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-07-17 08:32 -------
Created an attachment (id=6769)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6769&action=view)
Source code (-save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
2004-07-17 8:29 ` [Bug c++/16604] " igodard at pacbell dot net
2004-07-17 8:32 ` igodard at pacbell dot net
@ 2004-07-17 8:39 ` igodard at pacbell dot net
2004-07-17 9:06 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: igodard at pacbell dot net @ 2004-07-17 8:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-07-17 08:39 -------
Correction: an additional bug was that "Breaker" should have been "breaker", and the diagnostic should have complained that both Breaker and Ch were undefined. I'm guessing that the appearance of "<namespace>::<identifier>" is considered a using-declaration internally, but syntactically it's a qualified name. A diagnostic that talks about using-declarations is confusing.
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
` (2 preceding siblings ...)
2004-07-17 8:39 ` igodard at pacbell dot net
@ 2004-07-17 9:06 ` pinskia at gcc dot gnu dot org
2004-07-19 13:36 ` bangerth at dealii dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 9:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-17 09:06 -------
I can confirm this but I do not have a smaller testcase yet.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
` (3 preceding siblings ...)
2004-07-17 9:06 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 13:36 ` bangerth at dealii dot org
2004-07-19 13:40 ` Gabriel Dos Reis
2004-07-19 13:40 ` gdr at acm dot org
2004-07-30 19:36 ` pinskia at gcc dot gnu dot org
6 siblings, 1 reply; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-07-19 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-19 13:36 -------
The real bug is that you misspelled Hide::Breaker: it is only declared
with the lowercase name Hide::breaker.
This is the testcase:
-------------------
namespace NS {}
class X {
NS::NonExistent x;
};
-------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c -w x.cc
x.cc:4: error: using-declaration for non-member at class scope
x.cc:4: error: expected `;' before "x"
This is already fixed in mainline, though:
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
x.cc:4: error: `NonExistent' in namespace `NS' does not name a type
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Bug c++/16604] Bad diagnostic
2004-07-19 13:36 ` bangerth at dealii dot org
@ 2004-07-19 13:40 ` Gabriel Dos Reis
0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2004-07-19 13:40 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
bangerth at dealii dot org:
>
> ------- Additional Comments From bangerth at dealii dot org 2004-07-19
> 13:36 -------
> The real bug is that you misspelled Hide::Breaker: it is only declared
> with the lowercase name Hide::breaker.
>
> This is the testcase:
> -------------------
> namespace NS {}
>
> class X {
> NS::NonExistent x;
> };
> -------------------
>
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c -w x.cc
> x.cc:4: error: using-declaration for non-member at class scope
> x.cc:4: error: expected `;' before "x"
>
> This is already fixed in mainline, though:
>
> g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
> x.cc:4: error: `NonExistent' in namespace `NS' does not name a type
Indeed. That is an improvement. But, it still leaves the impression
that 'NonExistent' may designate something else, contrary to
what its spelling suggests :-)
We can tell the difference by looking at BINDING_VALUE and
BINDING_TYPE of the identifier. Any taker? :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
` (4 preceding siblings ...)
2004-07-19 13:36 ` bangerth at dealii dot org
@ 2004-07-19 13:40 ` gdr at acm dot org
2004-07-30 19:36 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: gdr at acm dot org @ 2004-07-19 13:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at acm dot org 2004-07-19 13:40 -------
Subject: Re: Bad diagnostic
bangerth at dealii dot org:
>
> ------- Additional Comments From bangerth at dealii dot org 2004-07-19
> 13:36 -------
> The real bug is that you misspelled Hide::Breaker: it is only declared
> with the lowercase name Hide::breaker.
>
> This is the testcase:
> -------------------
> namespace NS {}
>
> class X {
> NS::NonExistent x;
> };
> -------------------
>
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c -w x.cc
> x.cc:4: error: using-declaration for non-member at class scope
> x.cc:4: error: expected `;' before "x"
>
> This is already fixed in mainline, though:
>
> g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
> x.cc:4: error: `NonExistent' in namespace `NS' does not name a type
Indeed. That is an improvement. But, it still leaves the impression
that 'NonExistent' may designate something else, contrary to
what its spelling suggests :-)
We can tell the difference by looking at BINDING_VALUE and
BINDING_TYPE of the identifier. Any taker? :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/16604] Bad diagnostic
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
` (5 preceding siblings ...)
2004-07-19 13:40 ` gdr at acm dot org
@ 2004-07-30 19:36 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-30 19:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-07-30 19:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-17 8:29 [Bug c++/16604] New: Bad diagnostic igodard at pacbell dot net
2004-07-17 8:29 ` [Bug c++/16604] " igodard at pacbell dot net
2004-07-17 8:32 ` igodard at pacbell dot net
2004-07-17 8:39 ` igodard at pacbell dot net
2004-07-17 9:06 ` pinskia at gcc dot gnu dot org
2004-07-19 13:36 ` bangerth at dealii dot org
2004-07-19 13:40 ` Gabriel Dos Reis
2004-07-19 13:40 ` gdr at acm dot org
2004-07-30 19:36 ` pinskia 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).