Mail Archives: djgpp-workers/2001/11/04/04:58:55
> What prototype of bzero does GCC expect? More generally, how can one
> know what prototypes does GCC expect from functions it treats as
> built-in?
All C builtins (types and functions) are in c-common.c (function
c_common_nodes_and_builtins). I ran into them when fiddling with a
library for dynamic-loading, as it was a bad idea to provide
extern void* some_imported_function;
for them.
In the case of bzero, it looks like it expects
void bzero (<anything>);
(i.e. only the return type (void) is 'hardcoded').
> Apart of using -fno-nonansi-builtins (which I don't want to do, since
> older versions of GCC will probably barf on it), can I do something
> in the GDB distribution to avoid this warning? For example, are
> there some -Wxxx flags I can avoid using to shut this warning up?
It would seem that duplicate_decls() from c-decl.c (the function that
emits the warning) is called unconditionally, so I doubt if a -Wxxx
flag would help.
Without -fno-nonansi-builtins, the only escape is to use a compatible
declaration. It would indeed be nice if you could use
gcc --dump-builtins
or somesuch to get the list of what it expects.
- Raw text -