public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16785] New: [PR c++/16637 followup] syntax error on valid code
@ 2004-07-27 16:33 gbeauchesne at mandrakesoft dot com
  2004-07-27 16:43 ` [Bug c++/16785] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: gbeauchesne at mandrakesoft dot com @ 2004-07-27 16:33 UTC (permalink / raw)
  To: gcc-bugs

Hi,

I believe the following code is also valid.

typedef int I;

namespace A {
    typedef I I;
}

struct B {
    typedef I I;
};

struct C {
    typedef ::I I;
};

Fix to PR c++/16637 doesn't cover B::I case.

[gb@n2 gcc]$ ./g++ -B$PWD  -c /home/gb/vrac/lookup.cpp
/home/gb/vrac/lookup.cpp:8: error: declaration of `typedef I B::I'
/home/gb/vrac/lookup.cpp:1: error: changes meaning of `I' from `typedef int I'

Previous versions of gcc (3.3.X) accepts it, even icc 8.X recent enough with
-strict_ansi.

-- 
           Summary: [PR c++/16637 followup] syntax error on valid code
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gbeauchesne at mandrakesoft dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16785


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/16785] [PR c++/16637 followup] syntax error on valid code
  2004-07-27 16:33 [Bug c++/16785] New: [PR c++/16637 followup] syntax error on valid code gbeauchesne at mandrakesoft dot com
@ 2004-07-27 16:43 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-27 16:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-27 16:42 -------
I think this is a dup of bug 3252, typedef is just a storage class like static.

not a bug. see [3.3.6]/1 item 2

Since there is no diagnostic is required there is no bug in either in GCC or ICC.

*** This bug has been marked as a duplicate of 3252 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16785


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-27 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-27 16:33 [Bug c++/16785] New: [PR c++/16637 followup] syntax error on valid code gbeauchesne at mandrakesoft dot com
2004-07-27 16:43 ` [Bug c++/16785] " 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).