Closed nenadv closed 10 years ago
On 02/05/2014 08:19 PM, Nenad Vukicevic wrote:
The following code produces warnings:
shared int *s; int main () { strict shared int *p = upc_alloc (5); strict shared int *a = s; }
$ ../../bld/bin/clangupc -c t.upc t.upc:9:22: warning: initializing 'shared strict int *' with an expression of type 'shared void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] strict shared int *p = upc_alloc (5); ^ ~~~~~~~~~~~~~
Why is this a problem?
The same warning is being produced if I place "#pragama upc strict" at the top of the program or I include upc_strict.h.
it affects accesses, not the pointers.
Given that upc_alloc is defined (in upc.h) as follows:
extern shared void *upc_alloc (size_t);
Where/how are qualifiers 'discarded' when going from "shared void " to "strict shared int "?
The following code produces warnings:
The same warning is being produced if I place "#pragama upc strict" at the top of the program or I include upc_strict.h.