On 03/02/15 11:56, Markus Trippelsdorf wrote:
On 2015.03.02 at 18:53 +0100, Marek Polacek wrote:
On Mon, Mar 02, 2015 at 06:22:49PM +0100, Markus Trippelsdorf wrote:
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -519,6 +519,7 @@ init_vectorized_lexer (void)
     and VSX unaligned loads (when VSX is available).  This is otherwise
     the same as the pre-GCC 5 version.  */

+__attribute__ ((no_sanitize_undefined))
  static const uchar *
  search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
  {

I don't think you can use the __attribute__ just like that.  If adding
such an attribute is the correct thing to do, then we should probably
define a macro in include/ansidecl.h, with a proper GCC_VERSION guard.

Ok. Here is an updated version:

2015-03-02  Markus Trippelsdorf  <mar...@trippelsdorf.de>

include/
        PR target/65261
        * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.

libcpp/
        PR target/65261
        * lex.c (search_line_fast): Silence ubsan errors.
OK for the trunk.

jeff

Reply via email to