public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Lipe <robertl@dgii.com>
To: Marc Lehmann <pcg@goof.com>, egcs@cygnus.com
Subject: Re: i386.c warnings cleanup
Date: Tue, 10 Feb 1998 03:34:00 -0000	[thread overview]
Message-ID: <19980209225509.53605@dgii.com> (raw)
In-Reply-To: <19980210041543.12242@cerebro.laendle>

> This patch fixes all but two -Wall warnings in config/i386/i386.c

Lovely.  Thank you.

> +extern void error PVPROTO((char *s, ...));
> +extern void set_float_handler PROTO((jmp_buf));

There needs to be some gcc header file that contians protos for things
like error() that are essentially globals.

> +extern int atoi PROTO((char *));
> +extern void free PROTO((void *));
> +extern void bcopy PROTO((void *, void *, int n));

But what if bcopy accepts const void pointers?   What if free() returns
an int? (this was common practice long ago). 

We should avoid divinely knowing what we think are the correct protos
for system functions.   'Tis better to use what the system gives us.

How would you feel about getting the protos for the first two via:

#if HAVE_STDLIB_H
#include <stdlib.h>
#endif

The last one seems to find favor in this technique, though I don't
recall seeing any counter that this doesn't work well for all cases:

#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif



RJL

  parent reply	other threads:[~1998-02-10  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-09 19:27 Marc Lehmann
1998-02-09 19:49 ` Ian Lance Taylor
1998-02-10  0:53   ` Jeffrey A Law
1998-02-10  3:34 ` Robert Lipe [this message]
1998-02-11  0:47   ` Marc Lehmann
1998-02-12  2:36     ` Jeffrey A Law
1998-02-11  0:47 ` Jeffrey A Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980209225509.53605@dgii.com \
    --to=robertl@dgii.com \
    --cc=egcs@cygnus.com \
    --cc=pcg@goof.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).