public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* GOMP_offload_register
@ 2015-07-13 13:42 Nathan Sidwell
  2015-07-13 13:49 ` GOMP_offload_register Ilya Verbin
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Sidwell @ 2015-07-13 13:42 UTC (permalink / raw)
  To: ilya.verbin; +Cc: GCC Patches

Ilya,
GOMP_offload_register's target data argument is 'void *'.  Is there any reason 
it shouldn't be 'const void *'?  It would seem to me that that would be better?

(a cursory look at i386/intelmic-mkoffload.c suggests a lack of consts in the 
variable decls there.  ptx suffers the same problem)

nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GOMP_offload_register
  2015-07-13 13:42 GOMP_offload_register Nathan Sidwell
@ 2015-07-13 13:49 ` Ilya Verbin
  2015-07-13 13:59   ` GOMP_offload_register Nathan Sidwell
  0 siblings, 1 reply; 3+ messages in thread
From: Ilya Verbin @ 2015-07-13 13:49 UTC (permalink / raw)
  To: Nathan Sidwell; +Cc: GCC Patches

On Mon, Jul 13, 2015 at 09:42:50 -0400, Nathan Sidwell wrote:
> GOMP_offload_register's target data argument is 'void *'.  Is there
> any reason it shouldn't be 'const void *'?  It would seem to me that
> that would be better?
> 
> (a cursory look at i386/intelmic-mkoffload.c suggests a lack of
> consts in the variable decls there.  ptx suffers the same problem)

I can't remember any reason, so I agree that const is better (if this works :)

  -- Ilya

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GOMP_offload_register
  2015-07-13 13:49 ` GOMP_offload_register Ilya Verbin
@ 2015-07-13 13:59   ` Nathan Sidwell
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2015-07-13 13:59 UTC (permalink / raw)
  To: Ilya Verbin; +Cc: GCC Patches

On 07/13/15 09:49, Ilya Verbin wrote:
> On Mon, Jul 13, 2015 at 09:42:50 -0400, Nathan Sidwell wrote:
>> GOMP_offload_register's target data argument is 'void *'.  Is there
>> any reason it shouldn't be 'const void *'?  It would seem to me that
>> that would be better?
>>
>> (a cursory look at i386/intelmic-mkoffload.c suggests a lack of
>> consts in the variable decls there.  ptx suffers the same problem)
>
> I can't remember any reason, so I agree that const is better (if this works :)

Ok, I'll work in that direction.

(my thought was that for targets where their is mutable data in there, they 
should insert the appropriate const-removing casts)

nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-13 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 13:42 GOMP_offload_register Nathan Sidwell
2015-07-13 13:49 ` GOMP_offload_register Ilya Verbin
2015-07-13 13:59   ` GOMP_offload_register Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).