public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A'... @ 2004-03-21 13:09 pluto at ds14 dot agh dot edu dot pl 2004-03-21 15:13 ` [Bug c++/14668] " gdr at integrable-solutions dot net ` (5 more replies) 0 siblings, 6 replies; 11+ messages in thread From: pluto at ds14 dot agh dot edu dot pl @ 2004-03-21 13:09 UTC (permalink / raw) To: gcc-bugs class A {}; class B { static A *A; }; A *B::A = 0; g++3.4-20040317 compiles code without errors. g++3.3 reports error: declaration of `A*B::A' changes meaning of `A' from `class A' which behavior is correct? -- Summary: declaration of `A*B::A' changes meaning of `A' from `class A'... Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at ds14 dot agh dot edu dot pl CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: pentium3-pld-linux GCC host triplet: pentium3-pld-linux GCC target triplet: pentium3-pld-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] declaration of `A*B::A' changes meaning of `A' from `class A'... 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl @ 2004-03-21 15:13 ` gdr at integrable-solutions dot net 2004-03-21 15:15 ` [Bug c++/14668] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: gdr at integrable-solutions dot net @ 2004-03-21 15:13 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From gdr at integrable-solutions dot net 2004-03-21 15:13 ------- Subject: Re: New: declaration of `A*B::A' changes meaning of `A' from `class A'... "pluto at ds14 dot agh dot edu dot pl" <gcc-bugzilla@gcc.gnu.org> writes: | class A {}; | class B { | static A *A; | }; | A *B::A = 0; | | g++3.4-20040317 compiles code without errors. | g++3.3 reports error: declaration of `A*B::A' changes meaning of `A' from | `class A' | | which behavior is correct? The code is ill-formed. No diagnostic is required. GCC used to diagnose that in the past. This is a regression. I would think it is a serious one (a frequent mistake). -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] declaration of `A*B::A' changes meaning of `A' from `class A'... 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl 2004-03-21 15:13 ` [Bug c++/14668] " gdr at integrable-solutions dot net @ 2004-03-21 15:15 ` pinskia at gcc dot gnu dot org 2004-03-24 23:23 ` bangerth at dealii dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-03-21 15:15 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Summary|declaration of `A*B::A' |[3.4/3.5 Regression] |changes meaning of `A' from |declaration of `A*B::A' |`class A'... |changes meaning of `A' from | |`class A'... Target Milestone|--- |3.4.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] declaration of `A*B::A' changes meaning of `A' from `class A'... 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl 2004-03-21 15:13 ` [Bug c++/14668] " gdr at integrable-solutions dot net 2004-03-21 15:15 ` [Bug c++/14668] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org @ 2004-03-24 23:23 ` bangerth at dealii dot org 2004-03-25 0:22 ` gdr at integrable-solutions dot net ` (2 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: bangerth at dealii dot org @ 2004-03-24 23:23 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-03-24 23:23 ------- Hm, I may be blind today, but I fail to see what may be wrong with this code? (Clearly the initialization of the member has nothing to do with the problem here.) Gaby, do you refer to the "after declaration, reevaluate the declaration with the newly defined name and see whether it is still valid" rule? Or what do you refer to in saying that the code is invalid? W. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |gdr at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] declaration of `A*B::A' changes meaning of `A' from `class A'... 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl ` (2 preceding siblings ...) 2004-03-24 23:23 ` bangerth at dealii dot org @ 2004-03-25 0:22 ` gdr at integrable-solutions dot net 2004-03-25 4:47 ` [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration bangerth at dealii dot org 2004-05-25 1:27 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 11+ messages in thread From: gdr at integrable-solutions dot net @ 2004-03-25 0:22 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From gdr at integrable-solutions dot net 2004-03-25 00:22 ------- Subject: Re: [3.4/3.5 Regression] declaration of `A*B::A' changes meaning of `A' from `class A'... "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes: | Hm, I may be blind today, but I fail to see what may be wrong with this | code? (Clearly the initialization of the member has nothing to do with | the problem here.) Yes, I was not talking about the initialization. | Gaby, do you refer to the "after declaration, reevaluate | the declaration with the newly defined name and see whether it is still | valid" rule? Yes, that is the one I was referring to. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl ` (3 preceding siblings ...) 2004-03-25 0:22 ` gdr at integrable-solutions dot net @ 2004-03-25 4:47 ` bangerth at dealii dot org 2004-05-25 1:27 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 11+ messages in thread From: bangerth at dealii dot org @ 2004-03-25 4:47 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-03-25 04:47 ------- OK, this is most likely a regression with the new parser then. Thanks W. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Known to fail| |3.4.0 3.5.0 Known to work| |3.3.4 Last reconfirmed|0000-00-00 00:00:00 |2004-03-25 04:47:53 date| | Summary|[3.4/3.5 Regression] |[3.4/3.5 Regression] no |declaration of `A*B::A' |warning anymore for |changes meaning of `A' from |reevaluation of declaration |`class A'... | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl ` (4 preceding siblings ...) 2004-03-25 4:47 ` [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration bangerth at dealii dot org @ 2004-05-25 1:27 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 11+ messages in thread From: mmitchel at gcc dot gnu dot org @ 2004-05-25 1:27 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-05-24 02:47 ------- Working on a fix. -- 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=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20040321130905.14668.pluto@pld-linux.org>]
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration [not found] <20040321130905.14668.pluto@pld-linux.org> @ 2004-05-29 11:56 ` cvs-commit at gcc dot gnu dot org 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 11+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-05-29 11:56 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-28 20:12 ------- Subject: Bug 14668 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-05-28 20:12:12 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog parser.c gcc/testsuite/g++.old-deja/g++.benjamin: tem04.C Added files: gcc/testsuite/g++.dg/lookup: redecl1.C Log message: PR c++/14668 * parser.c (cp_parser_simple_type_specifier): Call maybe_note_name_used_in_class. PR c++/14668 * g++.dg/lookup/redecl1.C: New test. * g++.old-deja/g++.benjamin/tem04.C: Add error marker. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.184&r2=1.3389.2.185 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.106&r2=1.3892.2.107 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.28&r2=1.157.2.29 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/redecl1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.7&r2=1.7.16.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration [not found] <20040321130905.14668.pluto@pld-linux.org> 2004-05-29 11:56 ` cvs-commit at gcc dot gnu dot org @ 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org 2004-05-29 13:36 ` mmitchel at gcc dot gnu dot org 3 siblings, 0 replies; 11+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-05-29 12:35 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-28 20:17 ------- Subject: Bug 14668 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-05-28 20:17:22 Modified files: gcc/cp : ChangeLog gcc/testsuite : ChangeLog Log message: PR c++/14668 * parser.c (cp_parser_simple_type_specifier): Call maybe_note_name_used_in_class. PR c++/14668 * g++.dg/lookup/redecl1.C: New test. * g++.old-deja/g++.benjamin/tem04.C: Add error marker. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4062&r2=1.4063 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3785&r2=1.3786 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration [not found] <20040321130905.14668.pluto@pld-linux.org> 2004-05-29 11:56 ` cvs-commit at gcc dot gnu dot org 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org @ 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org 2004-05-29 13:36 ` mmitchel at gcc dot gnu dot org 3 siblings, 0 replies; 11+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-05-29 12:35 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-28 20:16 ------- Subject: Bug 14668 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-05-28 20:16:03 Modified files: gcc/cp : parser.c gcc/testsuite/g++.old-deja/g++.benjamin: tem04.C Added files: gcc/testsuite/g++.dg/lookup: redecl1.C Log message: PR c++/14668 * parser.c (cp_parser_simple_type_specifier): Call maybe_note_name_used_in_class. PR c++/14668 * g++.dg/lookup/redecl1.C: New test. * g++.old-deja/g++.benjamin/tem04.C: Add error marker. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.195&r2=1.196 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/redecl1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C.diff?cvsroot=gcc&r1=1.7&r2=1.8 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration [not found] <20040321130905.14668.pluto@pld-linux.org> ` (2 preceding siblings ...) 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org @ 2004-05-29 13:36 ` mmitchel at gcc dot gnu dot org 3 siblings, 0 replies; 11+ messages in thread From: mmitchel at gcc dot gnu dot org @ 2004-05-29 13:36 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-05-28 20:18 ------- Fixed in GCC 3.4.1. -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14668 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-05-28 20:18 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-03-21 13:09 [Bug c++/14668] New: declaration of `A*B::A' changes meaning of `A' from `class A' pluto at ds14 dot agh dot edu dot pl 2004-03-21 15:13 ` [Bug c++/14668] " gdr at integrable-solutions dot net 2004-03-21 15:15 ` [Bug c++/14668] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org 2004-03-24 23:23 ` bangerth at dealii dot org 2004-03-25 0:22 ` gdr at integrable-solutions dot net 2004-03-25 4:47 ` [Bug c++/14668] [3.4/3.5 Regression] no warning anymore for reevaluation of declaration bangerth at dealii dot org 2004-05-25 1:27 ` mmitchel at gcc dot gnu dot org [not found] <20040321130905.14668.pluto@pld-linux.org> 2004-05-29 11:56 ` cvs-commit at gcc dot gnu dot org 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org 2004-05-29 12:35 ` cvs-commit at gcc dot gnu dot org 2004-05-29 13:36 ` 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).