public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 guerby
  2001-11-13 15:03 ` Graham Stott
  0 siblings, 1 reply; 14+ messages in thread
From: guerby @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches

Fixes:

stage1/xgcc -Bstage1/ -B/home/guerby/work/gcc/install-2001-11-16-19-21-56/i686-pc-linux-gnu/bin/ -c  -DIN_GCC    `echo -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`  -g -O2    -I- -I. -I.. -I../../../gcc/gcc/ada -I../../../gcc/gcc/ada/.. -I../../../gcc/gcc/ada/../config -I../../../gcc/gcc/ada/../../include ../../../gcc/gcc/ada/utils.c
../../../gcc/gcc/ada/utils.c:482: warning: function declaration isn't a prototype

Untested but obvious, ok to commit?

-- 
Laurent Guerby <guerby@acm.org>


2001-11-16  Laurent Guerby  <guerby@acm.org>
	
	* utils.c: Fix warning.

Index: utils.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 utils.c
*** utils.c	2001/11/15 10:00:54	1.4
--- utils.c	2001/11/16 19:04:57
*************** pushdecl (decl)
*** 478,484 ****
     front end has been run.  */
  
  void
! gnat_init_decl_processing ()
  {
    lineno = 0;
  
--- 478,484 ----
     front end has been run.  */
  
  void
! gnat_init_decl_processing (void)
  {
    lineno = 0;

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: guerby; +Cc: gcc-patches

    Not true, I checked to see wether void was already used and found:

    void
    end_subprog_body (void)

That's an error.

    Looking in other ada/*.c files both style are used (PARAMS((void)) vs
    (void)).  It would be trivial to move to one or another. Richard,
    should I test and submit a patch moving to one of those style (and
    which one)?

They should all be the K&R way.  Consider such a patch preapproved.

    BTW, do the ada/*.c file use C features not supported by your average
    K&R compiler? (Giving a false sense of K&R'ness makes no good IMHO.)

They are not supposed to.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re:  [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` guerby
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: guerby; +Cc: gcc-patches

    Untested but obvious, ok to commit?

Yes, but doesn't this depend on a pending patch?

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: guerby; +Cc: gcc-patches

    This does not apply to GNAT files since we already need GNAT + GCC
    installed to start with so we do have an ANSI compiler around :).

But I still try to follow the K&R rules in GNAT C sources for
consistency.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 John David Anglin
  2001-11-13 15:03 ` guerby
  0 siblings, 1 reply; 14+ messages in thread
From: John David Anglin @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: guerby

>   void
> ! gnat_init_decl_processing (void)

All the functions in the file use KR style.  The function actually needs
a prototype.  There is one in misc.c but that is rather a strange place
for it.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re:  [Ada] Trivial fix for warning in utils.c
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: guerby; +Cc: gcc-patches

    Untested but obvious, ok to commit?
 
Oh, that's right: this is not OK.  I misread it and thought you were
changing the name.  This looks like a missing declaration somewhere.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-11-16 23:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 [Ada] Trivial fix for warning in utils.c guerby
2001-11-13 15:03 ` Graham Stott
2001-11-13 15:03   ` guerby
2001-11-13 15:03     ` Mark Mitchell
2001-11-13 15:03     ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 ` guerby
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 John David Anglin
2001-11-13 15:03 ` guerby
2001-11-13 15:03   ` Neil Booth
2001-11-13 15:03     ` Florian Weimer
2001-11-13 15:03 Richard Kenner

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).