This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

I'd like to get warnings on loss of data during implicit conversions


When i compile my c or C++ code under Microsoft compiler I get warnings like the following:
warning C4244: 'argument' : conversion from 'unsigned long' to 'uint16
', possible loss of data

However, compiling the same code with Gcc/G++ does not produce this warning at all?

My question is:
- is this a standard (i mean ISO) warning? or is it a courtesy warning?
- Does gcc have something similar to this? If so which option is that?

I have tried the following individiaully and in combination to no avail:

-Wall, -Wextra, -Wconversion
thanks
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]