public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* integer conversion warnings?
@ 2002-03-27  9:33 Egon Eckert
  2002-03-27  9:50 ` Ish Rattan
  0 siblings, 1 reply; 3+ messages in thread
From: Egon Eckert @ 2002-03-27  9:33 UTC (permalink / raw)
  To: gcc-help

Hi,

is gcc/g++ able to warn me in these cases:

short int a;
long int b;
a = b;

that the conversion may lose significant digits?  Borland's
compiler does it and I would really appreciate that. :-)

I didn't find the answer in FAQs nor in list archives nor
with Google -- is it *so* obvious? :-O

Thanks,

-- 
Egon Eckert, Heaven Industries, s.r.o.
E-mail: egon@heaven.industries.cz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: integer conversion warnings?
  2002-03-27  9:33 integer conversion warnings? Egon Eckert
@ 2002-03-27  9:50 ` Ish Rattan
  0 siblings, 0 replies; 3+ messages in thread
From: Ish Rattan @ 2002-03-27  9:50 UTC (permalink / raw)
  To: gcc-help

I do not think so. Stay with Borland sofware..

-ishwar

On Wed, 27 Mar 2002, Egon Eckert wrote:

> Hi,
>
> is gcc/g++ able to warn me in these cases:
>
> short int a;
> long int b;
> a = b;
>
> that the conversion may lose significant digits?  Borland's
> compiler does it and I would really appreciate that. :-)
>
> I didn't find the answer in FAQs nor in list archives nor
> with Google -- is it *so* obvious? :-O
>
> Thanks,
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: integer conversion warnings?
@ 2002-03-27 14:00 Peter Kurpis
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Kurpis @ 2002-03-27 14:00 UTC (permalink / raw)
  To: egon; +Cc: gcc-help

> is gcc/g++ able to warn me in these cases:
> 
> short int a;
> long int b;
> a = b;

I just tried  -Wall  which turns on almost all warnings, but
it didn't warn of the loss of precision.

My  lint  did, however. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-27 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27  9:33 integer conversion warnings? Egon Eckert
2002-03-27  9:50 ` Ish Rattan
2002-03-27 14:00 Peter Kurpis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).