[Mesa-dev] Janitorial work: no more intel_context.[ch]; tidying
Kenneth Graunke
kenneth at whitecape.org
Thu Oct 3 17:14:40 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.
I'm not opposed to doing that. I just didn't think it was necessary
anymore.
However, note that brw_blorp.h, brw_fs.h, brw_shader.h, gen6_blorp.h,
gen7_blorp.h, and intel_resolve_map.h already use #pragma once and don't
use the standard #ifndef...#endif wrapping. I think those are all C++
based, though...
Maybe we should switch those.
--Ken
More information about the mesa-dev
mailing list