Summary: | Compiler accepting ill-formed program trying to define a struct via using-declaration | ||
---|---|---|---|
Product: | gcc | Reporter: | Anders Granlund <anders.granlund.0> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | webrown.cpp |
Priority: | P3 | ||
Version: | unknown | ||
Target Milestone: | --- | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66934 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | prog.cc used in the command line |
Description
Anders Granlund
2015-07-15 21:13:44 UTC
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. |