Hi!

Apparently clang++ 3.2 and later (including current trunk, according to
godbolt https://godbolt.org/g/ekDs6H ) has a bug in its C++ parser that
it fails to properly parse the recent ubsan.h.

I've committed a workaround for that as obvious, after
bootstrapping/regtesting it on x86_64-linux and i686-linux.

2017-06-20  Jakub Jelinek  <ja...@redhat.com>

        PR sanitizer/81125
        * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
        by removing enum keyword.
        (ubsan_type_descriptor): Likewise.  Formatting fix.

--- gcc/ubsan.h.jj      2017-06-19 22:56:36.000000000 +0200
+++ gcc/ubsan.h 2017-06-20 00:31:16.714978973 +0200
@@ -55,8 +55,9 @@ extern bool ubsan_expand_objsize_ifn (gi
 extern bool ubsan_expand_vptr_ifn (gimple_stmt_iterator *);
 extern bool ubsan_instrument_unreachable (gimple_stmt_iterator *);
 extern tree ubsan_create_data (const char *, int, const location_t *, ...);
-extern tree ubsan_type_descriptor (tree, enum ubsan_print_style = 
UBSAN_PRINT_NORMAL);
-extern tree ubsan_encode_value (tree, enum ubsan_encode_value_phase
+extern tree ubsan_type_descriptor (tree, ubsan_print_style
+                                        = UBSAN_PRINT_NORMAL);
+extern tree ubsan_encode_value (tree, ubsan_encode_value_phase
                                      = UBSAN_ENCODE_VALUE_GENERIC);
 extern bool is_ubsan_builtin_p (tree);
 extern tree ubsan_build_overflow_builtin (tree_code, location_t, tree, tree,

        Jakub

Reply via email to