Warning request.

Kevin Atkinson kevinatk@home.com
Sun Feb 27 21:43:00 GMT 2000


On Sun, 27 Feb 2000, Gabriel Paubert wrote:

> Obviously what is wrong with this code is putting the return value of get
> into a char. At least standard fgetc is defined to return an unsigned char
> cast to an int or EOF, so that you can't confuse data with metadata.

Yes I released this.  

> Hopefully your FILE.get is defined in the same way.

It is the standard iostream::get

> > Is there some way for egcs to warn about comparison of a "char" to a
> > negative integer constant on platforms with a signed char?  
> 
> What about using -funsigned-char for tests, and using testcases which
> include character \0xff ? 

Ok, thanks.  I looked but could not find any relevant options.  Can this
be used without having to recompile any libraries....

> > It would be really help full as the submitted of the bug report claimed
> > code like this is 
> > responsible for 50 % of porting problems to the PowerPC.
> 
> And actually the original code is buggy, it just does not show often...

Yes it is.  The problem that it does not show often is way I never
released it.

---
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/



More information about the Gcc mailing list