Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch rfc] -Wmissing-prototypes round #3
Date: Wed, 11 Jun 2003 19:25:00 -0000	[thread overview]
Message-ID: <3EE781E1.2010209@redhat.com> (raw)
In-Reply-To: <86ptlk8mu3.fsf@elgar.kettenis.dyndns.org>

> Andrew Cagney <ac131313@redhat.com> writes:
> 
> 
>> - move function declarations to CPU-tdep.h, from config/CPU/tm-CPU.h
>> Ex, m68k's delta68 functions previously in tm-delta.h.
>> This ensures that the function declaration is always visible, and that a 
>> global function in CPU-tdep.c has its declaration in the corresponding 
>> CPU-tdep.h file.  The config/CPU/tm-CPU.h files were also updated to 
>> include the corresponding "CPU-tdep.h".
> 
> 
> I'm not sure whether this part of your patch is a good idea.  Quite a
> number of function declarations in config/CPU/tm-CPU.h are for things
> that haven't been multi-arched yet.  Keeping the function declaration
> next to the #define that uses them, makes it easier to remove them
> once they're no longer needed.

I thought someone might comment, that's why I tried to make what was 
happening very clear :-)

It's a real trade off.

-- delay -Wmissing-prototypes until multi-arch is finished

-- move the declarations so that they are always visible

-- drop -Werror for certain architectures

Given the problems that -Wmissing-prototypes has thrown up (extern in 
.c, forgetting to include .h), I'd prefer to see it enabled.

Also note the number of *-tdep.c functions I make static.  It's pretty 
clear that people deleting the #define/declaration consistently forget 
to update the corresponding function definition.

I think a better way of handling these stray global declarations would 
be to use some sort of real code analysis tool (which the ari isn't :-).

enjoy,
Andrew



  reply	other threads:[~2003-06-11 19:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-11 17:43 Andrew Cagney
2003-06-11 18:56 ` Mark Kettenis
2003-06-11 19:25   ` Andrew Cagney [this message]
2003-06-11 23:47     ` Kevin Buettner
2003-06-11 20:31 ` Kevin Buettner
2003-06-11 20:59   ` Andrew Cagney
2003-06-11 23:30     ` Kevin Buettner
2003-06-12 14:30 ` Richard Earnshaw
2003-06-12 17:09   ` Andrew Cagney
2003-06-13 14:13     ` Richard Earnshaw
2003-06-13 19:40       ` Andrew Cagney
2003-06-12 18:08 ` Andrew Cagney

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=3EE781E1.2010209@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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