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

Reply via email to