https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57855

torvald at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-01-21
          Component|libitm                      |c
            Version|unknown                     |6.0
     Ever confirmed|0                           |1

--- Comment #3 from torvald at gcc dot gnu.org ---
I can confirm that this still happens with r232693 if the test program is
compiled as a C program; a warning is produced, but there is no error.

However, if compiling the reproducer as a C++ program, an error is returned, as
required by the TM TS:

pr57855.c:28:14: error: invalid conversion from ‘void (*)(const char*, int,
const char*, int, const void*)’ to ‘ADD_STAT {aka void (*)(const char*, int,
const char*, int, const void*) transaction_safe}’ [-fpermissive]
   bar(my_func);

I'm not sure whether the initial TM specification required an error, but I
think it's better to keep this open given that ISO C++ SG5 people are working
on / interested in a variant of the TM TS for C (ie, so that we don't forget
about it).  Eventually, I would suppose that we phase out support for the old
TM specification.  Therefore, I've also reduced the priority of this and
associated this with the C frontend.

Reply via email to