This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64863] New: error for use of members of a forward declared enum is poor
- From: "tbsaunde at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Jan 2015 16:54:49 +0000
- Subject: [Bug c++/64863] New: error for use of members of a forward declared enum is poor
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64863
Bug ID: 64863
Summary: error for use of members of a forward declared enum is
poor
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tbsaunde at gcc dot gnu.org
consider this test case
enum class foo;
int bar();
int main()
{
if (bar() < foo::baz)
return 0;
return 1;
}
produces
test.cpp: In function ÃâËint main()Ãââ:
test.cpp:7:14: error: ÃâËbazÃââ is not a member of ÃâËfooÃââ
if (bar() < foo::baz)
^
which while true isn't terrible helpful. I'd think it would be better to say
only a forward declaration of foo has been seen, and to use members you need
the full definition.