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]

gcc C - No Warning when downcasting


Hi,
 I am a bit new to using gcc. 
 I want to know about which gcc command line option will  give the warning when downcasting of integer variables to short/char etc.

 Ex:
   int main ()
   {
     int i = 100000;
     short j;
     char a;
     
     j = i;
     a = i;
   }

The above fragment does not produce any warning with gcc.
I did try out some of the flags given in the info page, maybe I missed something...
I am using gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) currently...

Kindly help.

TIA.
Sar


_____________________________________________________________
Powered by a short email address ... http://www.k.st

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag


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