[lug] [OT] g++ error message: declared with an exception specification?
Scott Herod
herod at dimensional.com
Tue Nov 19 10:30:50 MST 2002
Hello,
Sorry of the OT post, but this is about the best group of people for it.
I'm trying to write a bash built-in and compile it with g++. This is with
bash 2-05a source from the GNU folk. I'm getting errors like:
../GNU/bash-2.05a/general.h:187: `sh_intfunc_t' declared with an exception
specification
where line 187 reads:
typedef int sh_intfunc_t __P((int));
and __P is defined with:
#if !defined (__P)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
# define __P(protos) protos
# else
# define __P(protos) ()
# endif
#endif
A test file (below) compiles just fine.
======================================================================
#if !defined (__P)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
# define __P(protos) protos
# else
# define __P(protos) ()
# endif
#endif
typedef int spam_is_good __P((int));
typedef char* spuds_are_bad ();
typedef int spam_spuds (int);
====================================================================
Can anyone suggest a way for me to see what the compiler sees with the
typedef lines? I suspect that __P must be redefined somewhere but can't
find where.
Thanks,
Scott
More information about the LUG
mailing list