public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61490] New: accepts-invalid: qualified-name in friend function definition
@ 2014-06-12 16:49 filip.roseen at gmail dot com
2014-12-14 14:51 ` [Bug c++/61490] " ville.voutilainen at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: filip.roseen at gmail dot com @ 2014-06-12 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61490
Bug ID: 61490
Summary: accepts-invalid: qualified-name in friend function
definition
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: filip.roseen at gmail dot com
Created attachment 32929
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32929&action=edit
testcase.cpp
namespace N { void f (); }
struct A {
friend void N::f () { } // violates [class.friend]p6
};
int main () { }
-----------------------------------------
`gcc` inaccurately accepts the above snippet, even though we are
referring to a qualified-name in our friend definition, something
which is ill-formed according to [class.friend]p6:
> A function can be defined in a friend declaration of a class if and
> only if the class is a non-local class (9.8), the function name is
> unqualified, and the function has namespace scope.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/61490] accepts-invalid: qualified-name in friend function definition
2014-06-12 16:49 [Bug c++/61490] New: accepts-invalid: qualified-name in friend function definition filip.roseen at gmail dot com
@ 2014-12-14 14:51 ` ville.voutilainen at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-14 14:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61490
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-14
CC| |ville.voutilainen at gmail dot com
Ever confirmed|0 |1
Known to fail| |4.8.2, 4.9.1, 5.0
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Clang rejects the code.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-14 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 16:49 [Bug c++/61490] New: accepts-invalid: qualified-name in friend function definition filip.roseen at gmail dot com
2014-12-14 14:51 ` [Bug c++/61490] " ville.voutilainen at gmail 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).