> On Sep 17, 2017, at 19:22, Jan Vesely <[email protected]> wrote:
>
> On Sun, 2017-09-17 at 17:02 -0700, Matt Arsenault wrote:
>>> On Sep 16, 2017, at 20:15, Jan Vesely <[email protected]> wrote:
>>>
>>> afaik, noinline is not defined in CLC, so it should be ifdefed on
>>> __clang__
>>>
>>
>> It’s not, but my reading of the standard is that it’s required to
>> parse any unknown attributes and ignore them. ifdef clang would be
>> too restrictive (e.g. it wouldn’t work with the old EDG frontend)
>
> OK, if it helps. ignoring/warning is sensible compiler behaviour.
>
> I haven't found anything about unknown attributes in the specs (CLC or
> GCC), so technically it should be UB.
>
> Jan
>
> --
> Jan Vesely <[email protected]>
6.11.5 in the 1.2 spec says:
Attributes are intended as useful hints to the compiler. It is our intention
that a particular implementation of OpenCL be free to ignore all attributes and
the resulting executable binary will produce the same result. This does not
preclude an implementation from making use of the additional information
provided by attributes and performing optimizations or other transformations as
it sees fit. In this case it is the programmer’s responsibility to guarantee
that the information provided is in some sense correct.
My interpretation is it should be OK to ignore unknown attributes
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit