|
|
|
|
|
by kevinastock
4312 days ago
|
|
Shouldn't it be 'float * restrict a'? When could one get into trouble thinking that "restrict == this will not alias"? If X is never modified during B it seems like aliasing wouldn't cause any problems. Since restrict means nothing if no value in it is modified, would it be reasonable and possible for the compiler to issue a warning in cases like example1? |
|
IE you will get into performance trouble :)
In general, there are some complicated scope related cases where you will get into trouble (the rules deal with "based on" and "scope" all over the place, and not in ways that always make sense).