Subject: Re: gcc-current and warnings in bin/sh
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 06/02/2002 13:34:41
>>> - if (varflag && is_name(*p)) {
>>> + int c;
>>> + if (varflag && is_name((c = *p))) {
>> [...] you don't need another variable for something like this; a
>> cast should be quite enough:
> I don't know about GCC-current, but in GCC 2.95.3 a cast doesn't
> work. See doc/HACKS, entry "gcc-unsigned-compare".
That's about enums, and then only when building with -fshort-enums.
Does it affect chars too, then? (Also, could some language lawyer
check whether this really is permitted behaviour, and if not, file a
bug report with the gcc folks? I _think_ we have a person or two on
here who's got a copy of The Standard....)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B