public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55338] New: Incorrectly reported error in type name hiding
@ 2012-11-15 11:02 piotr.wyderski at gmail dot com
  2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: piotr.wyderski at gmail dot com @ 2012-11-15 11:02 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55338
           Summary: Incorrectly reported error in type name hiding
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: piotr.wyderski@gmail.com


The following snippet:

class A {};
class B : public A {

   typedef A super;

public:

   class X {};
};


class C : public B {

   typedef B super;

   class X : public super::X {

      typedef super::X super;
   };
};

compiles without a warning on Comeau and MSVC, but GCC (4.6.1 and
4.7.1) failes with the following message:

$ gcc -c bug.cpp
bug.cpp:18:24: error: declaration of ‘typedef class B::X C::X::super’
[-fpermissive]
bug.cpp:14:14: error: changes meaning of ‘super’ from ‘typedef class B
C::super’ [-fpermissive]

To my understanding of the Standard Comeau is right and GCC is wrong here.


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

* [Bug c++/55338] Incorrectly reported error in type name hiding
  2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
@ 2012-11-16 14:15 ` paolo.carlini at oracle dot com
  2012-11-16 15:07 ` piotr.wyderski at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-16 14:15 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-16 14:15:34 UTC ---
See:

  http://gcc.gnu.org/ml/gcc/2012-11/msg00241.html

Daniel, do you agree?


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

* [Bug c++/55338] Incorrectly reported error in type name hiding
  2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
  2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
@ 2012-11-16 15:07 ` piotr.wyderski at gmail dot com
  2012-11-16 17:28 ` pinskia at gcc dot gnu.org
  2012-11-16 17:38 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: piotr.wyderski at gmail dot com @ 2012-11-16 15:07 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Piotr Wyderski <piotr.wyderski at gmail dot com> 2012-11-16 15:06:45 UTC ---
IMO this case is not covered by the linked paragraph,
so please wait and let me create a thread on
compl.lang.c++.moderated and then proceed accordingly.


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

* [Bug c++/55338] Incorrectly reported error in type name hiding
  2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
  2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
  2012-11-16 15:07 ` piotr.wyderski at gmail dot com
@ 2012-11-16 17:28 ` pinskia at gcc dot gnu.org
  2012-11-16 17:38 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-16 17:28 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-16 17:27:50 UTC ---
http://gcc.gnu.org/ml/gcc/2012-11/msg00259.html
Covers why this still invalid code.

See also 13935.


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

* [Bug c++/55338] Incorrectly reported error in type name hiding
  2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
                   ` (2 preceding siblings ...)
  2012-11-16 17:28 ` pinskia at gcc dot gnu.org
@ 2012-11-16 17:38 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-16 17:38 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-16 17:38:40 UTC ---
Closing.


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

end of thread, other threads:[~2012-11-16 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 11:02 [Bug c++/55338] New: Incorrectly reported error in type name hiding piotr.wyderski at gmail dot com
2012-11-16 14:15 ` [Bug c++/55338] " paolo.carlini at oracle dot com
2012-11-16 15:07 ` piotr.wyderski at gmail dot com
2012-11-16 17:28 ` pinskia at gcc dot gnu.org
2012-11-16 17:38 ` paolo.carlini at oracle dot com

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