Re: [PATCH] C++ breaks on linux/ioport.h

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Sun Apr 30 2000 - 10:44:22 EST


Sean Hunter wrote:
> main(){
> printf("I am a %s compiler\n", (sizeof 'A' == 1) ? "C++" : "C");
> }
>
> [sean@henry /tmp]$ gcc /tmp/testx.c ; ./a.out
> I am a C compiler
> [sean@henry /tmp]$ g++ /tmp/testx.c ; ./a.out
> I am a C++ compiler
>
> The above output is mandatory for all standards-compliant C and C++
> compilers.

I think you forgot Crays where sizeof(char) == sizeof(int) == sizeof(long)
:-)

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:18 EST