This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64758] New: [C++11] Give better error message when name of enum's base type cannot be resolved
- From: "zeratul976 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Jan 2015 23:00:10 +0000
- Subject: [Bug c++/64758] New: [C++11] Give better error message when name of enum's base type cannot be resolved
- Auto-submitted: auto-generated
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 {
^