From: Jeff Mitchell Date: 2004-05-25T09:10:06+09:00 Subject: -Wstrict-prototypes for extensions It is inconvenient compiling extensions with -Wstrict-prototypes because ruby.h and intern.h emit a slew of warnings. This is important because #include int main() { int a = f() ; /* ------> a contains junk <------ */ printf("%d\n", a) ; } double f() { return 99.0 ; } You will not obtain a warning if f() is defined in a different file. I propose #define RUBY_STRICT_PROTOTYPES #include "ruby.h" for extension writers wishing strict prototypes. --- defines.h 14 Apr 2004 02:03:15 -0000 1.41 +++ defines.h 24 May 2004 23:34:49 -0000 @@ -38,7 +38,11 @@ #ifdef __cplusplus #define ANYARGS ... #else -#define ANYARGS +# ifdef RUBY_STRICT_PROTOTYPES +# define ANYARGS void +# else +# define ANYARGS +# endif #endif #define xmalloc ruby_xmalloc __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/