New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20507 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

gmp.h uses possibly undefined __STDC_VERSION__

Reported by: stephen@… Owned by: mcalhoun@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: gmp

Description

This causes GCC 4.0.1 (build 5490), which is either the stock GCC in Mac OS X 10.5.7 or the GCC supplied by Xcode, to spew a warning.

This is due to your patch-gmp-h.in.diff. Since I do not understand the point of this patch, I decline to try to solve the problem.

Change History

Changed 3 years ago by mcalhoun@…

  • status changed from new to assigned
  • owner changed from macports-tickets@… to mcalhoun@…

The problem the patch tries to solve is described in comment 6 of #16634.
What warning does XCode give?

Changed 3 years ago by stephen@…

When building XEmacs 21.5.29, I get several score of these warnings:

/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 

because "lisp.h" is included practically everywhere.

Xcode is not involved, except that maybe it supplied this version of the compiler.

Changed 3 years ago by vinc17@…

I think you could still add && defined __STDC_VERSION__ before && __STDC_VERSION__ >= 199901L (I haven't tried, but this should make the warning disappear).

Changed 3 years ago by mcalhoun@…

  • status changed from assigned to closed
  • resolution set to fixed

Should be fixed in r54734.

Changed 3 years ago by stephen@…

Yes, that suppresses the warnings, as expected.

Note that what I didn't understand was how the magic number 5465 was chosen, and therefore whether simply suppressing the warning or changing the build number was appropriate.

Note: See TracTickets for help on using tickets.