Enum type check

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

 



Hi all ,

If we compile attached c file (enum.c), build result is different
between C & C++ compiler.

example:
[naveen@localhost ~]$ gcc enum.c
[naveen@localhost ~]$ g++ enum.c
enum.c: In function âint main()â:
enum.c:13: error: cannot convert âtypeBâ to âtypeAâ in assignment
[naveen@localhost ~]$


Is there any flag/option in GCC to catch this issue, which we can do
easily in G++.

thanks
naveen

Attachment: enum.c
Description: Binary data


[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