diff mbox

[frv-linux] Silence warning

Message ID 20120721101346.GD21845@lug-owl.de
State New
Headers show

Commit Message

Jan-Benedict Glaw July 21, 2012, 10:13 a.m. UTC
Hi!

I currently see

	warning: implicit declaration of function ‘frv_ifcvt_machdep_init’

while gcc/ifcvt.c and

	warning: no previous prototype for ‘frv_ifcvt_machdep_init’

while gcc/config/frv/frv.c are built.  The following patch fixes it.

MfG, JBG

gcc/
2012-07-21  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
	* config/frv/frv-protos.h: Update copyright year,
	include basic-block.h (for ce_if_block_t).
	(frv_ifcvt_machdep_init): Declare.

Comments

Nick Clifton July 23, 2012, 7:28 a.m. UTC | #1
Hi JBG,

> 	warning: implicit declaration of function ‘frv_ifcvt_machdep_init’
> 	warning: no previous prototype for ‘frv_ifcvt_machdep_init’

oops!

> gcc/
> 2012-07-21  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
> 	* config/frv/frv-protos.h: Update copyright year,
> 	include basic-block.h (for ce_if_block_t).
> 	(frv_ifcvt_machdep_init): Declare.

Approved - please apply.

Cheers
   Nick
Jan-Benedict Glaw July 23, 2012, 11:34 a.m. UTC | #2
On Mon, 2012-07-23 08:28:53 +0100, nick clifton <nickc@redhat.com> wrote:
> Hi JBG,
> 
> >	warning: implicit declaration of function ‘frv_ifcvt_machdep_init’
> >	warning: no previous prototype for ‘frv_ifcvt_machdep_init’
> 
> oops!
> 
> >gcc/
> >2012-07-21  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
> >	* config/frv/frv-protos.h: Update copyright year,
> >	include basic-block.h (for ce_if_block_t).
> >	(frv_ifcvt_machdep_init): Declare.
> 
> Approved - please apply.

My key isn't set-up for committing to GCC (only for binutils up to
now.)  Please commit it yourself and I'll apply for
commit-after-approval rights for GCC.

Thanks, JBG
Nick Clifton July 23, 2012, 1:08 p.m. UTC | #3
Hi JBG,

>>> 2012-07-21  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
>>> 	* config/frv/frv-protos.h: Update copyright year,
>>> 	include basic-block.h (for ce_if_block_t).
>>> 	(frv_ifcvt_machdep_init): Declare.
>>
>> Approved - please apply.
>
> My key isn't set-up for committing to GCC (only for binutils up to
> now.)  Please commit it yourself and I'll apply for
> commit-after-approval rights for GCC.

Ok - I have applied a variant of your patch.  I should have noted before 
that including other headers in *-protos.h is frowned upon.  Plus in 
this case it is not necessary since the parameter to
frv_ifcvt_machdep_init is not used.  So I just made it a void * and 
updated frv.c.

Cheers
   Nick

gcc/ChangeLog
2012-07-23  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
	    Nick Clifton  <nickc@redhat.com>

	* config/frv/frv-protos.h (frv_ifcvt_machdep_init): Prototype.
	* config/frv/frv.c (frv_ifcvt_machdep_init): Change type of
	(unused) parameter to void *.
diff mbox

Patch

diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index 62e2506..97d6730 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -1,6 +1,6 @@ 
 /* Frv prototypes.
    Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
-   2011
+   2011, 2012
    Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
@@ -21,11 +21,13 @@  along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 /* Define functions defined in frv.c */
+#include "basic-block.h"
 extern void frv_expand_prologue			(void);
 extern void frv_expand_epilogue			(bool);
 extern frv_stack_t *frv_stack_info		(void);
 extern void frv_debug_stack			(frv_stack_t *);
 extern int frv_initial_elimination_offset	(int, int);
+extern void frv_ifcvt_machdep_init		(ce_if_block_t *ce_info ATTRIBUTE_UNUSED);
 
 #ifdef RTX_CODE
 extern int frv_legitimate_address_p_1		(enum machine_mode, rtx,