On 05/15/2012 02:16 PM, Patrick Marlier wrote:
Tested on i686.
Is the patch ok? Thanks.

BTW, Should we generate a warning or an error?
--
2012-05-15  Patrick Marlier <patrick.marl...@gmail.com>

         * trans-mem.c (diagnose_tm_1_op): Warn about assignment of transaction
         unsafe function to safe function pointer.

Hum.  I wonder if there's some other way to do this in the front end.
The transition safe->unsafe is of course ok, but unsafe->safe is not.
It sure seems like we ought to be able to leverage the type check
elsewhere in the language.

Unfortunately, the only existing switch we have for attributes is a
hard compatible/incompatible flag.  So it would take some effort to
extend that to somethine more complicated.

I don't think this check here really does any good at all, since it
only applies to tm regions, and the assignment can happen anywhere.

I suppose for the moment we could flip the switch and force
incompatibility, then relax that as we improve the front end?


r~

Reply via email to