public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16151] New: Poor diagnostics
@ 2004-06-23 5:54 igodard at pacbell dot net
2004-06-23 6:10 ` [Bug c++/16151] " pinskia at gcc dot gnu dot org
2004-07-22 12:58 ` bangerth at dealii dot org
0 siblings, 2 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2004-06-23 5:54 UTC (permalink / raw)
To: gcc-bugs
class B{};
class A{
public:
void Foo(b& buf) {}
};
void Bar(b& fub){}
int main() {
return 0;
}
Gets you:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc:4: error: variable or field `Foo' declared void
foo.cc:4: error: expected `;' before '(' token
foo.cc:5: error: expected `;' before '}' token
foo.cc:7: error: variable or field `Bar' declared void
foo.cc:7: error: `b' was not declared in this scope
foo.cc:7: error: `fub' was not declared in this scope
foo.cc:7: error: expected `,' or `;' before '{' token
The actual problem is that both "b" should have been "B", so there should be at most two "undefined identifier" messages - only one if (as gcc usually does) the second and subsequent are suppressed. Instead we get only one 'b' error, but on the *second* occurrance; three spurious errors wanting ";"; two very odd "declared void" messages; and one unknown identifier on "fub" that is not matched by one on "buf". It is not clear to me why the two cases (class vs. file scope) do not produce identical messages, but there you are.
Comeau gives:
"ComeauTest.c", line 4: error: identifier "b" is undefined
void Foo(b& buf) {}
^
"ComeauTest.c", line 7: error: incomplete type is not allowed
void Bar(b& fub){}
^
"ComeauTest.c", line 7: error: identifier "b" is undefined
void Bar(b& fub){}
^
"ComeauTest.c", line 7: error: identifier "fub" is undefined
void Bar(b& fub){}
^
"ComeauTest.c", line 7: error: expected a ";" (perhaps on the previous statement)
void Bar(b& fub){}
^
At end of source: warning: parsing restarts here after previous syntax error
This is somewhat but not that much better: they get both instances of 'b', only one ";", and no "void" nessages. But like gcc they also give "fub" but not "buf", and they add an "incomplete type" message - but only on the error in class scope.
--
Summary: Poor diagnostics
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=16151
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
2004-06-23 5:54 [Bug c++/16151] New: Poor diagnostics igodard at pacbell dot net
@ 2004-06-23 6:10 ` pinskia at gcc dot gnu dot org
2004-07-22 12:58 ` bangerth at dealii dot org
1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-23 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-23 05:54 -------
Confirmed, I do not know if this counts as a regression though:
pr16151.cc:4: error: `b' was not declared in this scope
pr16151.cc:4: error: `buf' was not declared in this scope
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2004-06-23 05:54:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
2004-06-23 5:54 [Bug c++/16151] New: Poor diagnostics igodard at pacbell dot net
2004-06-23 6:10 ` [Bug c++/16151] " pinskia at gcc dot gnu dot org
@ 2004-07-22 12:58 ` bangerth at dealii dot org
1 sibling, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-07-22 12:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-22 12:58 -------
This is a duplicate of PR 15786.
*** This bug has been marked as a duplicate of 15786 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
[not found] <bug-16151-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:964741883aedae54621992e25aac928a96b9c096
commit r10-11372-g964741883aedae54621992e25aac928a96b9c096
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 3 00:40:13 2023 +0100
libquadmath: Assorted libquadmath strtoflt128 fixes [PR87204, PR94756]
This patch cherry-pickx 8 commits from glibc which fix various strtod_l
bugs.
2023-03-03 niXman <i.nixman@autistici.org>
Jakub Jelinek <jakub@redhat.com>
PR libquadmath/87204
PR libquadmath/94756
* strtod/strtod_l.c (round_and_return): Cherry-pick glibc
9310c284ae9 BZ #16151, 4406c41c1d6 BZ #16965 and fcd6b5ac36a
BZ #23279 fixes.
(____STRTOF_INTERNAL): Cherry-pick glibc b0debe14fcf BZ #23007,
5556d30caee BZ #18247, 09555b9721d and c6aac3bf366 BZ #26137 and
d84f25c7d87 fixes.
(cherry picked from commit df63f4162c78ef799d4ea9dec3443d5e9c51e5aa)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
[not found] <bug-16151-4@http.gcc.gnu.org/bugzilla/>
2023-03-02 23:42 ` cvs-commit at gcc dot gnu.org
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:9d98f84ca37a154a24f3f2b2950bfb450cbe6316
commit r11-10719-g9d98f84ca37a154a24f3f2b2950bfb450cbe6316
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 3 00:40:13 2023 +0100
libquadmath: Assorted libquadmath strtoflt128 fixes [PR87204, PR94756]
This patch cherry-pickx 8 commits from glibc which fix various strtod_l
bugs.
2023-03-03 niXman <i.nixman@autistici.org>
Jakub Jelinek <jakub@redhat.com>
PR libquadmath/87204
PR libquadmath/94756
* strtod/strtod_l.c (round_and_return): Cherry-pick glibc
9310c284ae9 BZ #16151, 4406c41c1d6 BZ #16965 and fcd6b5ac36a
BZ #23279 fixes.
(____STRTOF_INTERNAL): Cherry-pick glibc b0debe14fcf BZ #23007,
5556d30caee BZ #18247, 09555b9721d and c6aac3bf366 BZ #26137 and
d84f25c7d87 fixes.
(cherry picked from commit df63f4162c78ef799d4ea9dec3443d5e9c51e5aa)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
[not found] <bug-16151-4@http.gcc.gnu.org/bugzilla/>
2023-03-02 23:42 ` cvs-commit at gcc dot gnu.org
@ 2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
3 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-19 5:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:7d685cb42c1568f6ac017ea2503b366ec474ce0e
commit r12-9282-g7d685cb42c1568f6ac017ea2503b366ec474ce0e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 3 00:40:13 2023 +0100
libquadmath: Assorted libquadmath strtoflt128 fixes [PR87204, PR94756]
This patch cherry-pickx 8 commits from glibc which fix various strtod_l
bugs.
2023-03-03 niXman <i.nixman@autistici.org>
Jakub Jelinek <jakub@redhat.com>
PR libquadmath/87204
PR libquadmath/94756
* strtod/strtod_l.c (round_and_return): Cherry-pick glibc
9310c284ae9 BZ #16151, 4406c41c1d6 BZ #16965 and fcd6b5ac36a
BZ #23279 fixes.
(____STRTOF_INTERNAL): Cherry-pick glibc b0debe14fcf BZ #23007,
5556d30caee BZ #18247, 09555b9721d and c6aac3bf366 BZ #26137 and
d84f25c7d87 fixes.
(cherry picked from commit df63f4162c78ef799d4ea9dec3443d5e9c51e5aa)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16151] Poor diagnostics
[not found] <bug-16151-4@http.gcc.gnu.org/bugzilla/>
@ 2023-03-02 23:42 ` cvs-commit at gcc dot gnu.org
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-02 23:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16151
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:df63f4162c78ef799d4ea9dec3443d5e9c51e5aa
commit r13-6427-gdf63f4162c78ef799d4ea9dec3443d5e9c51e5aa
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 3 00:40:13 2023 +0100
libquadmath: Assorted libquadmath strtoflt128 fixes [PR87204, PR94756]
This patch cherry-pickx 8 commits from glibc which fix various strtod_l
bugs. Additionally, it makes mp_limb_t 64-bit on llp64 targets like
64-bit cygwin.
2023-03-03 niXman <i.nixman@autistici.org>
Jakub Jelinek <jakub@redhat.com>
PR libquadmath/87204
PR libquadmath/94756
* printf/gmp-impl.h (mp_limb_t, mp_limb_signed_t,
BITS_PER_MP_LIMB):
Use 64-bit limbs on LLP64 targets.
* strtod/strtod_l.c (round_and_return): Cherry-pick glibc
9310c284ae9 BZ #16151, 4406c41c1d6 BZ #16965 and fcd6b5ac36a
BZ #23279 fixes.
(____STRTOF_INTERNAL): Cherry-pick glibc b0debe14fcf BZ #23007,
5556d30caee BZ #18247, 09555b9721d and c6aac3bf366 BZ #26137 and
d84f25c7d87 fixes.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-03 15:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-23 5:54 [Bug c++/16151] New: Poor diagnostics igodard at pacbell dot net
2004-06-23 6:10 ` [Bug c++/16151] " pinskia at gcc dot gnu dot org
2004-07-22 12:58 ` bangerth at dealii dot org
[not found] <bug-16151-4@http.gcc.gnu.org/bugzilla/>
2023-03-02 23:42 ` cvs-commit at gcc dot gnu.org
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.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).