[Mesa-dev] Janitorial work: no more intel_context.[ch]; tidying

Ian Romanick idr at freedesktop.org
Wed Oct 2 13:27:09 PDT 2013


On 10/02/2013 12:51 PM, Matt Turner wrote:
> On Wed, Oct 2, 2013 at 11:02 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> (Adding Alan to the CC list.)
>>
>> On 10/01/2013 10:51 PM, Vinson Lee wrote:
>>> On Mon, Sep 30, 2013 at 10:21 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
>>>> On 09/27/2013 06:24 PM, Emil Velikov wrote:
>>>>> * With the recent split of the intel driver codebase, the new i965
>>>>> headers has been getting a bunch of #pragma once over the standard
>>>>> #ifndef _HEADER_H_... Are those intentional ?
>>>>
>>>> Yup, that's intentional.  "#pragma once" doesn't require inventing a
>>>> unique #define name, is less typing, and is faster on some compilers.
>>>>
>>>> I actually forgot that it wasn't standard.  It's supported basically
>>>> everywhere, though, so I'd be really shocked if it caused problems.
>>>
>>> Oracle Solaris Studio does not support "#pragma once".
>>
>> Is there *any* reason to use that compiler over GCC?  This isn't the
>> first time that we've discovered it to be lacking some feature that GCC,
>> clang, and Visual Studio all support. :(
> 
> Before we go down this rabbit hole -- Vinson said it doesn't support
> #pragma once. He didn't say it caused problems. I don't expect it is,
> since we're already using it and have been for a long time.
> 
> It probably just means that you have to to #pragma once along with the
> standard #ifndef ... #endif wrapper.

Understood.  The changes in this patch series use only the pragma, and
we've identified some benefits of that approach.  I'd like to have those
benefits, but this compiler seems to stand in the way.  We've had the
"do we need to support this compiler" for other compilers in the past.
Sometimes the answer is yes, and sometimes the answer is no.



More information about the mesa-dev mailing list