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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2004-05-24  2:47 UTC | newest]

Thread overview: 7+ 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

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).