This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc C - No Warning when downcasting
- From: Saravanan T S <saravanan at k dot st>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 7 Jun 2003 01:17:21 -0700 (PDT)
- Subject: gcc C - No Warning when downcasting
- Reply-to: saravanan at k dot st
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