[Bug c++/64758] New: [C++11] Give better error message when name of enum's base type cannot be resolved
zeratul976 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 23 23:00:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
Bug ID: 64758
Summary: [C++11] Give better error message when name of enum's
base type cannot be resolved
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zeratul976 at hotmail dot com
For the following invalid code:
enum Waldo : uint32_t { // oops, forgot to include <stdint.h>
A, B
};
GCC's error message is:
test.cpp:1:6: error: use of enum ‘Waldo’ without previous declaration
enum Waldo : uint32_t {
^
test.cpp:1:12: error: expected unqualified-id before ‘:’ token
enum Waldo : uint32_t {
^
This error doesn't really match the problem. A much better error would be:
test.cpp:1:6: error: use of ‘uint32_t’ without previous declaration
enum Waldo : uint32_t {
^
More information about the Gcc-bugs
mailing list