gcc warn C++ implicit enum conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
Is there any way to warn on enum conversion to int? I tried few options, but no warning seems possible.

Cheers, Jonny

//-O2 -Wall -Wextra -Wconversion -Werror

#include <cstddef>
typedef enum
{
    a = -1
} a_t;

a_t f()
{
    return a;
}

int main()
{
    int b = f();
    return b;
}




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux