[Bug c++/92159] New: -Wenum-conversion for C++
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Sat Oct 19 14:26:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92159
Bug ID: 92159
Summary: -Wenum-conversion for C++
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jg at jguk dot org
Target Milestone: ---
Bug 60591 added -Wenum-conversion for C
Could this be added for C++ too?
#1 with x86-64 gcc (trunk)
cc1plus: error: command-line option '-Wenum-conversion' is valid for C/ObjC but
not for C++ [-Werror]
cc1plus: all warnings being treated as errors
Compiler returned: 1
Test case
enum xpto
{
A = 0,
B = 1,
X = 512
};
extern void print (unsigned int);
unsigned char bar (enum xpto a)
{
return a;
}
More information about the Gcc-bugs
mailing list