Solaris 9/SPARC
Sun Forte 6.2 compiler
1) The compiler generates tons of warnings
warning: _Bool is a keyword in ISO C99
2) The compiler generates tons of warnings
warning: end-of-loop code not reached
3) Compilation fails in gsl:
cc -fast -DHAVE_CONFIG_H -I. -I. -I. -I..
-I/usr/local/BerkeleyDB.3.3/include -DBOGOFILTER
-DRENAMEFILES -g -c -o libbf_gsl_a-exp.o `test -f
'../gsl/specfunc/exp.c' || echo './'`../gsl/specfunc/exp.c
cc: Warning: -xarch=native has been explicitly
specified, or implicitly specified by a macro option,
-xarch=native on this architecture implies
-xarch=v8plusb which generates code that does not run
on pre UltraSPARC III processors
"../gsl/gsl_sf_exp.h", line 145: warning: end-of-loop
code not reached
"../gsl/gsl_sf_exp.h", line 150: warning: end-of-loop
code not reached
"../gsl/specfunc/exp.c", line 99: warning: end-of-loop
code not reached
"../gsl/specfunc/exp.c", line 109: identifier
redefined: gsl_sf_exp_e
current : function(const double, pointer to
struct gsl_sf_result_struct {double val, double err})
returning int
previous: function(const double, pointer to
struct gsl_sf_result_struct {double val, double err})
returning int : "../gsl/gsl_sf_exp.h", line 141
"../gsl/specfunc/exp.c", line 111: warning: end-of-loop
code not reached
It works when I disable HAVE_INLINE in src/config.h.
Logged In: YES
user_id=30510
Hi Lars,
Thanks for your report. It's appreciated :-)
More recent versions of bogofilter have dropped the
HAVE_INLINE check. Can you download and try the current
version, which is 0.91.4???
Thanks.
David
Logged In: YES
user_id=2788
Lars,
please check if the problem persists in the latest stable version of bogofilter
and let us know what you'll have found.
Thanks,
Matthias
Logged In: YES
user_id=28904
Sorry for the late reply - my SF inbox gets to swamped with
spam and
mailer-demon replies that I never noticed David's comment.
I can confirm that this is fixed in 0.92.4. Issue 1),
however, persists; you
may want to look at it before 1.0 :)
Thanks, guys!
Logged In: YES
user_id=2788
Can you give an example for #1 so I know what to look after?
Can you show what config.h or config.log say for:
HAVE_STDBOOL_H
HAVE__BOOL (two underscore characters)
Logged In: YES
user_id=28904
cc -fast -xarch=generic -DHAVE_CONFIG_H -I. -I. -I.
-I../gnugetopt -I../trio -I- -I. -I. -I../gsl/specfunc
-I.. -I/usr/local/BerkeleyDB.3.3/include -DBOGOFILTER -g
-c version.c
"./bftypes.h", line 32: warning: _Bool is a keyword in ISO C99
"./system.h", line 114: warning: _Bool is a keyword in ISO C99
"./common.h", line 104: warning: _Bool is a keyword in ISO C99
"./common.h", line 105: warning: _Bool is a keyword in ISO C99
"./globals.h", line 18: warning: _Bool is a keyword in ISO C99
"./globals.h", line 19: warning: _Bool is a keyword in ISO C99
"./globals.h", line 20: warning: _Bool is a keyword in ISO C99
"./globals.h", line 22: warning: _Bool is a keyword in ISO C99
"./globals.h", line 23: warning: _Bool is a keyword in ISO C99
"./globals.h", line 25: warning: _Bool is a keyword in ISO C99
"./globals.h", line 26: warning: _Bool is a keyword in ISO C99
"./globals.h", line 27: warning: _Bool is a keyword in ISO C99
"./globals.h", line 29: warning: _Bool is a keyword in ISO C99
"./globals.h", line 32: warning: _Bool is a keyword in ISO C99
"./globals.h", line 42: warning: _Bool is a keyword in ISO C99
"./globals.h", line 44: warning: _Bool is a keyword in ISO C99
"./globals.h", line 63: warning: _Bool is a keyword in ISO C99
"./globals.h", line 64: warning: _Bool is a keyword in ISO C99
"./globals.h", line 93: warning: _Bool is a keyword in ISO C99
"./globals.h", line 106: warning: _Bool is a keyword in ISO C99
"./globals.h", line 107: warning: _Bool is a keyword in ISO C99
Both symbols are undefined in config.h.
configure:4575: checking for stdbool.h that conforms to C99
configure:4628: cc -fast -xarch=generic -c -g conftest.c >&5
"conftest.c", line 27: cannot find include file: <stdbool.h>
"conftest.c", line 29: #error: bool is not defined
configure:4660: checking for _Bool
configure:4684: cc -fast -xarch=generic -c -g conftest.c >&5
"conftest.c", line 63: warning: _Bool is a keyword in ISO C99
"conftest.c", line 63: undefined symbol: _Bool
"conftest.c", line 63: syntax error before or at: )
"conftest.c", line 65: warning: _Bool is a keyword in ISO C99
Logged In: YES
user_id=2788
Does adding the "-xc99" option to CPPFLAGS help?
Try:
ksh configure CPPFLAGS='-xc99 -I/usr/local/include'
or similar
Logged In: YES
user_id=28904
It does not help. The compiler does not complain about it,
but I can't find
any mention of it in the cc and cpp man page either.
Logged In: YES
user_id=2788
The -xc99 is new as of Forte 6.2 and "enables the compiler
to accept the syntax and semantic for some of the features
in the C99 standard". Switching on -xc99 or -xc99=%all is
supposed to enable support for _Bool, which bogofilter's
configure script is supposed to detect. The test program
used to figure HAVE__BOOL is, includes aside:
int
main ()
{
if ((_Bool *) 0)
return 0;
if (sizeof (_Bool))
return 0;
;
return 0;
}
So this -xc99 option should work. Perhaps in CC, ./configure
CC="cc -xc99=%all", but I'm not sure about that. bogofilter
is using the default AC_HEADER_STDBOOL autoconf macro so
this might better be solved within autoconf.
At any rate, the problem is that the compiler emits the
warnings but doesn't offer a <stdbool.h> header file or
_Bool type by default. Looks inconsistent to me. If you have
support for Forte 6.2, ask Sun for a statement how we should
address this (I'd think they'd suggest -xc99=%all, too).
I'm closing this bug without solution, if you've found a way
to quench these warnings in Forte 6.2, just follow up and
reopen it.