This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning request.
- To: Gabriel Paubert <paubert at iram dot es>
- Subject: Re: Warning request.
- From: Kevin Atkinson <kevinatk at home dot com>
- Date: Mon, 28 Feb 2000 00:45:54 -0500 (EST)
- cc: Kevin Atkinson <kevinatk at home dot com>, GCC Hackers <gcc at gcc dot gnu dot org>
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/