Ubsan merged into trunk

Marek Polacek polacek@redhat.com
Sat Aug 31 16:04:00 GMT 2013


On Fri, Aug 30, 2013 at 06:58:06PM -0400, David Edelsohn wrote:
> This patch  / merge broke bootstrap on AIX:
> 
> In file included from ./tm.h:18:0,
>                  from /home/dje/src/src/gcc/function.h:26,
>                  from /home/dje/src/src/gcc/basic-block.h:25,
>                  from /home/dje/src/src/gcc/cgraph.h:28,
>                  from /home/dje/src/src/gcc/ubsan.c:25:
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_type_descriptor(tree)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
>    sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
>                                                                ^
> /home/dje/src/src/gcc/ubsan.c:282:3: note: in expansion of macro
> 'ASM_GENERATE_INTERNAL_LABEL'
>    ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", type_var_id_num++);
>    ^
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_create_data(const char*, location_t, ...)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
>    sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
> 
> If you use macros like ASM_GENERATE_INTERNAL_LABEL, which may cal
> target-specific functions, you need to include tm_p.h to pull in
> <target>-protos.h.

I see, sorry.  Will commit the following fix as obvious in a bit.

2013-08-31  Marek Polacek  <polacek@redhat.com>

	* ubsan.c: Include tm_p.h.

--- gcc/ubsan.c.mp	2013-08-31 17:12:48.719219402 +0200
+++ gcc/ubsan.c	2013-08-31 17:13:05.895281454 +0200
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
 #include "hashtab.h"
 #include "pointer-set.h"
 #include "output.h"
+#include "tm_p.h"
 #include "toplev.h"
 #include "ubsan.h"
 #include "c-family/c-common.h"

	Marek



More information about the Gcc-patches mailing list