gcc C - No Warning when downcasting

John Love-Jensen eljay@adobe.com
Mon Jun 9 12:43:00 GMT 2003


Hi Sar,

>I want to know about which gcc command line option will give the warning when
downcasting of integer variables to short/char etc.

None.

Implicit "downcasting" from int to short or char is part of C/C++.  So such
code is completely legal and legit.

Unfortunately.

Sincerely,
--Eljay




More information about the Gcc-help mailing list