diff mbox

[committed] Fix error message for -mno-pointers-to-nested-functions

Message ID 20120207184148.GA3507@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner Feb. 7, 2012, 6:41 p.m. UTC
David pointed out that I had not updated the error message for
-mno-pointers-to-nested-functions when I changed the name of the switch.  I
installed the following patch as obvious after making sure it bootstrapped and
ran make check.

[gcc]
2012-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_trampoline_init): Fix error
	message for -mno-pointers-to-nested-function.

[gcc/testsuite]
2012-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/no-r11-3.c (outer_func): Fix error message
	for -mno-pointers-to-nested-functions.
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 183975)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -24032,7 +24032,8 @@  rs6000_trampoline_init (rtx m_tramp, tre
 	rtx fnmem, fn_reg, toc_reg;
 
 	if (!TARGET_POINTERS_TO_NESTED_FUNCTIONS)
-	  error ("-mno-r11 must not be used if you have trampolines");
+	  error ("You cannot take the address of a nested function if you use "
+		 "the -mno-pointers-to-nested-functions option.");
 
 	fnmem = gen_const_mem (Pmode, force_reg (Pmode, fnaddr));
 	fn_reg = gen_reg_rtx (Pmode);
Index: gcc/testsuite/gcc.target/powerpc/no-r11-3.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/no-r11-3.c	(revision 183975)
+++ gcc/testsuite/gcc.target/powerpc/no-r11-3.c	(working copy)
@@ -5,7 +5,7 @@ 
 extern void ext_call (int (func) (void));
 
 int
-outer_func (int init)	/* { dg-error "-mno-r11 must not be used if you have trampolines" "" } */
+outer_func (int init)	/* { dg-error "-mno-pointers-to-nested-functions option" "" } */
 {
   int value = init;