Hi Diego!

The recent tree.h refactoring moved a function, but not a #define it
was using. This broke pdp11-aout:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
-I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
-I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o cfgexpand.o -MT cfgexpand.o 
-MMD -MP -MF ./.deps/cfgexpand.TPo /home/jbglaw/repos/gcc/gcc/cfgexpand.c
/home/jbglaw/repos/gcc/gcc/cfgexpand.c: In function ‘basic_block_def* 
expand_gimple_cond(basic_block, gimple)’:
/home/jbglaw/repos/gcc/gcc/cfgexpand.c:1987:75: warning: comparison is always 
true due to limited range of data type [-Wtype-limits]
/home/jbglaw/repos/gcc/gcc/cfgexpand.c: In function ‘void 
expand_main_function()’:
/home/jbglaw/repos/gcc/gcc/cfgexpand.c:5409:40: error: ‘NAME__MAIN’ was not 
declared in this scope
make[1]: *** [cfgexpand.o] Error 1

(See http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=27247)

This fixes the fallout by moving the #define of NAME__MAIN:


2013-11-09  Jan-Benedict Glaw  <jbg...@lug-owl.de>

gcc/
        * function.c (NAME__MAIN): Move to...
        * cfgexpand.c (NAME__MAIN): ...here.


diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 8faf48a..4e622c0 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -61,6 +61,14 @@ along with GCC; see the file COPYING3.  If not see
 #include "recog.h"
 #include "output.h"
 
+/* Some systems use __main in a way incompatible with its use in gcc, in these
+   cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
+   give the same symbol without quotes for an alternative entry point.  You
+   must define both, or neither.  */
+#ifndef NAME__MAIN
+#define NAME__MAIN "__main"
+#endif
+
 /* This variable holds information helping the rewriting of SSA trees
    into RTL.  */
 struct ssaexpand SA;
diff --git a/gcc/function.c b/gcc/function.c
index ba881c9..a36f152 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -71,14 +71,6 @@ along with GCC; see the file COPYING3.  If not see
 
 #define STACK_BYTES (STACK_BOUNDARY / BITS_PER_UNIT)
 
-/* Some systems use __main in a way incompatible with its use in gcc, in these
-   cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
-   give the same symbol without quotes for an alternative entry point.  You
-   must define both, or neither.  */
-#ifndef NAME__MAIN
-#define NAME__MAIN "__main"
-#endif
-
 /* Round a value to the lowest integer less than it that is a multiple of
    the required alignment.  Avoid using division in case the value is
    negative.  Assume the alignment is a power of two.  */


Ok?

MfG, JBG

-- 
      Jan-Benedict Glaw      jbg...@lug-owl.de              +49-172-7608481
Signature of:                     Eine Freie Meinung in einem Freien Kopf
the second  :                   für einen Freien Staat voll Freier Bürger.

Attachment: signature.asc
Description: Digital signature

Reply via email to