Issue550

classification
Title __STDC_VERSION__ not defined warning on Mac OS X
Type defect Module core code 21.5
Severity inconvenience Platform N/A
Keywords Nosy List stephen
explanation
process
These controls should only be changed by committers and tracker administrators.
Status done/needs work   Reason not our bug
Superseder   Submitted 2009-07-31.17:19:34
Priority normal   Assigned To

Created on 2009-07-31.17:10:43 by stephen, last changed 2009-08-01.13:36:32 by stephen.

Messages
msg1798 [hidden] ([hidden]) Date: 2009-08-01.13:36:32
MacPorts GMP is fixed as of r54734.  If you're not using an SVN checkout 
of MacPorts, I'm not sure what the maps to, but the fix should be along 
shortly for rsyncers etc.
msg1797 [hidden] ([hidden]) Date: 2009-08-01.04:28:04
  Message-ID: <87tz0scfp3.fsf@uwakimon.sk.tsukuba.ac.jp>
Jerry James writes:
 > On Fri, Jul 31, 2009 at 11:19 AM, Stephen J. Turnbull<stephen@xemacs.org> wrote:
 > > I think this is an extremely unusual case restricted to a very
 > > specific platform/compiler combination, so I'm not planning to do
 > > anything about it, except post the workaround, below.  Let me know if
 > > it seems worthy of more attention than that.
 > 
 > I don't think that __STDC_VERSION__ is required to be defined

Indeed.

 > unless you have a C99 compiler.  If you configure with --std=gnu99,
 > is __STDC_VERSION__ defined then?

Yes, but requiring C99 globally requires, eh, "a bit of" discussion,
and I don't see the point in doing all the configure hoop-jumping to
be sure that (a) the system actually has the problem and (b) the
relevant standards flags are available to limit it to the case where
it's useful.

Among other things it seems pretty likely that the MacPorts folks (who
regularly use Caterpillar backhoes to make furniture, I hear) will
eventually[1] realize their mistake.

Footnotes: 
[1]  Bug reports I've submitted are usually dealt with in 18 months or
less.:-/

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
msg1796 [hidden] ([hidden]) Date: 2009-07-31.18:20:01
  Message-ID: <870180fe0907311119g1517e697xb4442d9a5b611a18@mail.gmail.com>
On Fri, Jul 31, 2009 at 11:19 AM, Stephen J. Turnbull<stephen@xemacs.org> wrote:
> I think this is an extremely unusual case restricted to a very
> specific platform/compiler combination, so I'm not planning to do
> anything about it, except post the workaround, below.  Let me know if
> it seems worthy of more attention than that.

I don't think that __STDC_VERSION__ is required to be defined unless
you have a C99 compiler.  If you configure with --std=gnu99, is
__STDC_VERSION__ defined then?

(Hi all.  Yes, I'm alive, just swamped with $dayjob since returning
from vacation.  I'll get to all my piled up XEmacs mail Real Soon Now.
 Really.)
-- 
Jerry James
http://www.jamezone.org/

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
msg1795 [hidden] ([hidden]) Date: 2009-07-31.17:10:43
  Message-ID: <87y6q4db2x.fsf@uwakimon.sk.tsukuba.ac.jp>
I think this is an extremely unusual case restricted to a very
specific platform/compiler combination, so I'm not planning to do
anything about it, except post the workaround, below.  Let me know if
it seems worthy of more attention than that.

On Mac OS X v.10.5.7 with the stock GCC, I get literally hundreds of
these warnings:

gcc -c -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts \
    -Wpacked -Wpointer-arith -Wunused-parameter -g    -Demacs \
    -I. -I/Users/steve/src/XEmacs/sandbox/src -DHAVE_CONFIG_H \
    -I/opt/local/include -I/opt/local/include \
    -I/opt/local/include/freetype2 -I/usr/X11/include \
    /Users/steve/src/XEmacs/sandbox/src/EmacsFrame.c
In file included from
/Users/steve/src/XEmacs/sandbox/src/number-gmp.h:43,
                 from /Users/steve/src/XEmacs/sandbox/src/number.h:62,
                 from /Users/steve/src/XEmacs/sandbox/src/lisp.h:3874,
                 from /Users/steve/src/XEmacs/sandbox/src/EmacsFrame.c:30:
/opt/local/include/gmp.h:427:74: warning: "__STDC_VERSION__" is not defined

This is due to line 287 in gmp.h:

#elif !(defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && __STDC_VERSION__ >= 199901L)

which is MacPorts brain damage, not from GMP itself (there's a patch
in the MacPorts tree, so yes I'm sure).

If you run into this, running

    CFLAGS=-D__STDC_VERSION__=0L ./configure ...

(where ... is your usual set of flags to configure) will suppress
these warnings, and should be safe.

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
History
Date User Action Args
2009-08-01 13:36:32stephensetmessages: + msg1798
2009-08-01 07:51:38stephensetstatus: done/needs work
assignedto: stephen
reason: not our bug
severity: inconvenience
platform: + N/A
type: defect
module: + core code 21.5
priority: normal
2009-08-01 04:28:04stephensetmessages: + msg1797
2009-07-31 18:20:02jamessetmessages: + msg1796
2009-07-31 17:10:43stephencreate