This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66888] Compiler accepting ill-formed program trying to define a struct via using-declaration


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

--- Comment #2 from Anders Granlund <anders.granlund.0 at gmail dot com> ---
This bug seems to be more general than struct definitions. It also exists for
variable declarations like this:

  namespace X { extern int i; }

  namespace N { using X::i; }

  int N::i = 1;

  int main() {}

The above program is ill-formed by [dcl.meaning]p1, but no error message is
given.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]