Bug #14366
closedNot possible to compile ruby C extension when using `-std=c90`
Description
DeveloperHowto says that ruby should be C90, not C99, however it's not possible
to compile C extension using -std=c90
command line argument with error:
C:/Ruby25/include/ruby-2.5.0/ruby/defines.h:224:25: warning: ISO C90 does not support 'long long' [-Wlong-long]
# define LONG_LONG long long
as far a I can tell, long long
is only defined by C99
, so defines.h
probably shouldn't contain it.
Updated by shyouhei (Shyouhei Urabe) over 7 years ago
- Status changed from Open to Rejected
Let me reject this. Using long long when available must never be a bad thing.
Also, we do check availability of long long using configure. If you really have to kill long long, try configure --with-gcc="gcc --pedantic-errors"
or something like that.
Updated by graywolf (Gray Wolf) over 7 years ago
Out of curiosity, is there any particular reason we still stick with c90?
Updated by naruse (Yui NARUSE) over 7 years ago
graywolf (Gray Wolf) wrote:
Out of curiosity, is there any particular reason we still stick with c90?
Because VC++ and Solaris' cc doesn't support part of C99.
Therefore we use C90+some extensions.
What extensions we use are described at https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Assumptions
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
It your ruby is compiled with that option, long long
should not be used.