enums in C++
Gabriel Dos Reis
gdr@codesourcery.com
Tue Apr 18 07:58:00 GMT 2000
Ulrich Drepper <drepper@redhat.com> writes:
| Nathan Sidwell <nathan@codesourcery.com> writes:
|
| > > return a + foo (A | B);
| > this is not legal C++. there is no implicit conversion from int
| > to enum. You need an explict cast. Hence the error.
|
| But I was calling a C function.
Not quite. If I understand correctly, your were calling a function
with a "C" linkage. 'extern "C"' isn't a flag for language switch.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list