From: "Tim Van Holder" To: Subject: Re: Built-in bzero Date: Sun, 4 Nov 2001 10:54:37 +0100 Message-ID: <000901c16516$b6c5b260$797c76d5@pandora.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-reply-to: <8582-Sat03Nov2001193344+0200-eliz@is.elta.co.il> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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 (); (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.