On Tue, Mar 21, 2006 at 08:56:05PM +0000, Martin Michlmayr wrote:
> Package: ogre
> Version: 1.0.6-1.3
> Severity: important
[snip]
> Further investigation shows that on MIPS the constant "mips" is
> defined as 1. I have no idea who thought this was a good idea, but
> the compiler does it - so please use a different variable name.
> Apparently GCC on i386 defines i386=1 too... *shakes head*
I'm inclined to claim this is a long-standing bug in the compiler which
violates the ANSI namespace.
> (sid)859:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] cat test.c
> int main() {
> printf("%d\n", mips);
> }
> (sid)860:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] gcc test.c
> test.c: In function ???main???:
> test.c:2: warning: incompatible implicit declaration of built-in
> function ???printf???
> (sid)861:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] ./a.out
> 1
> zsh: exit 2 ./a.out
> (sid)872:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] uname -m
> mips64
> (sid)873:[EMAIL PROTECTED]: ~/tmp/src/ogre-1.0.6] gcc -E -x c /dev/null
> -Wp,-dM | grep " mips "
> #define mips 1
JFTR, at least all gcc versions from 3.3 onward do define their
respective architecture name that way. Earlier ones like 2.95
probably do as well.
Thiemo
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]