[C++ PATCH] Add test for c++/67533 (or not?)
Jason Merrill
jason@redhat.com
Wed Jun 12 20:15:00 GMT 2019
On 6/9/19 7:37 PM, Marek Polacek wrote:
> This testcase used to ICE but was fixed by r259067. We now issue
>
> 67533.C:5:26: error: conversion from âvoidâ to non-scalar type âTlsâ requested
> 5 | thread_local Tls mytls = mytls; // { dg-error "" }
> | ^~~~~
>
> whereas clang++ and icc compile it. However, the test uses a reserved identifier
> ([lex.name]/3), and I think the error is fine.
> Do you think it's worth adding this test? I thought so, just to check we don't
> ICE, but who uses a mangled name as an identifier?!
OK.
I suppose get_tls_wrapper_fn could check whether a previous declaration
has the right type, to give a more helpful diagnostic.
The original testcase makes me wonder if we should be marking
compiler-generated functions as no_instrument_function.
Jason
More information about the Gcc-patches
mailing list