Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(27)

Issue 6198054: gnu-tm: Dont allow assigning transaction_unsafe functions to transaction_safe function pointers

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by daveb
Modified:
1 year, 5 months ago
Reviewers:
patrick.marlier, triegel, rth, patrick.marlier
CC:
gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M gcc/c-typeck.c View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 6
daveb
Without this patch it is perfectly fine to assign non-transaction_safe functions to function pointers marked ...
12 years, 11 months ago (2012-05-08 23:02:04 UTC) #1
triegel_redhat.com
On Tue, 2012-05-08 at 18:02 -0500, Dave Boutcher wrote: > Without this patch it is ...
12 years, 11 months ago (2012-05-15 16:23:47 UTC) #2
patrick.marlier_gmail.com
Follow-up of Dave's patch. I would prefer to see such checks in trans-mem.c as follows. ...
12 years, 11 months ago (2012-05-15 21:16:06 UTC) #3
daveb
On Tue, May 15, 2012 at 11:23 AM, Torvald Riegel <triegel@redhat.com> wrote: > > On ...
12 years, 11 months ago (2012-05-16 01:50:54 UTC) #4
daveb
On Tue, May 15, 2012 at 4:16 PM, Patrick Marlier <patrick.marlier@gmail.com> wrote: > Follow-up of ...
12 years, 11 months ago (2012-05-16 01:53:04 UTC) #5
rth_redhat.com
12 years, 11 months ago (2012-05-16 15:49:06 UTC) #6
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.marlier@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~
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b