On Feb 19, 2000, Olly Betts <[EMAIL PROTECTED]> wrote:

> This defect is easy enough to correct by making use of your idea of a
> potentially negative array dimension - we can try compiling "int
> a[(char)-1];" which will compile if char is unsigned, and fail if it's
> signed.  Revised patch attached.

But it may fail to compile if char is unsigned and
sizeof(char)==sizeof(unsigned int).

How about:

switch (c) { case 0: case (((char)-1) >= 0): ; }

-- 
Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaranį
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

Reply via email to