compiler option for g++

P

poornimamprabhu

What is the compiler option which shows the mismatch of types in
assignments for C language

The option -Wconversion is not working for the g++.But it works for
gcc.

Is there a compiler option for this in CC.

My assignment is

unsigned char a;
unsigned int b;

a = b; here trucation happens ...
 
J

Joachim Schmitz

What is the compiler option which shows the mismatch of types in
assignments for C language
OT here, ask in a group that deals with your compiler
The option -Wconversion is not working for the g++.But it works for
gcc.
OT here (see above) but if -Wconversion works with gcc, just use it.
g++ is AFAIK a C++ Compiler and as such completly OT here
Is there a compiler option for this in CC.

My assignment is

unsigned char a;
unsigned int b;

a = b; here trucation happens ...

Bye, Jojo
 
S

santosh

What is the compiler option which shows the mismatch of types in
assignments for C language

The option -Wconversion is not working for the g++.But it works for
gcc.

Is there a compiler option for this in CC.

My assignment is

unsigned char a;
unsigned int b;

a = b; here trucation happens ...

Try in comp.lang.c++
 
K

Keith Thompson

santosh said:
Try in comp.lang.c++

Better yet, try in gnu.gcc.help (assuming that gcc's extensive
documentation doesn't help). The question is about the behavior of
the gcc and/or g++ compiler, not about either language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top