public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51584] New: Errorneous compilation when deriving from an inaccessible friend class.
@ 2011-12-16 18:33 prasoonsaurav.nit at gmail dot com
  2011-12-16 20:05 ` [Bug c++/51584] " pinskia at gcc dot gnu.org
  2015-03-27 18:43 ` [Bug c++/51584] Erroneous " paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: prasoonsaurav.nit at gmail dot com @ 2011-12-16 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51584
           Summary: Errorneous compilation when deriving from an
                    inaccessible friend class.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: prasoonsaurav.nit@gmail.com


struct A {
 private:         
     class face;
     friend class face; 
};

struct A::face {};    

template <typename _CharT>
struct C : public A::face
{};

int main()
{
  C<int> x;
}

gets compiled on g++ 4.6.1.

It shouldn't because

"A name nominated by a friend declaration shall be 
accessible in the scope of the class containing the friend
declaration" [11.4.7]

A::face is inaccessible at the point of derivation. Comeau issues an error
message.


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

* [Bug c++/51584] Errorneous compilation when deriving from an inaccessible friend class.
  2011-12-16 18:33 [Bug c++/51584] New: Errorneous compilation when deriving from an inaccessible friend class prasoonsaurav.nit at gmail dot com
@ 2011-12-16 20:05 ` pinskia at gcc dot gnu.org
  2015-03-27 18:43 ` [Bug c++/51584] Erroneous " paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-16 20:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-16 19:58:58 UTC ---
I think this is related to PR 47346.


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

* [Bug c++/51584] Erroneous compilation when deriving from an inaccessible friend class.
  2011-12-16 18:33 [Bug c++/51584] New: Errorneous compilation when deriving from an inaccessible friend class prasoonsaurav.nit at gmail dot com
  2011-12-16 20:05 ` [Bug c++/51584] " pinskia at gcc dot gnu.org
@ 2015-03-27 18:43 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-27 18:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51584

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-27
             Blocks|                            |65608
     Ever confirmed|0                           |1


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

end of thread, other threads:[~2015-03-27 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 18:33 [Bug c++/51584] New: Errorneous compilation when deriving from an inaccessible friend class prasoonsaurav.nit at gmail dot com
2011-12-16 20:05 ` [Bug c++/51584] " pinskia at gcc dot gnu.org
2015-03-27 18:43 ` [Bug c++/51584] Erroneous " 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).