[Mesa-dev] linker.cpp warning

Brian Paul brian.e.paul at gmail.com
Tue Jan 24 12:09:58 PST 2012


On Tue, Jan 24, 2012 at 12:40 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 01/24/2012 10:08 AM, Brian Paul wrote:
>>
>> I've been seeing this error from linker.cpp for a few days now:
>>
>> linker.cpp: In function ‘gl_shader* link_intrastage_shaders(void*,
>> gl_context*, gl_shader_program*, gl_shader**, unsigned int)’:
>> linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
>> gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
>> declared with greater visibility than the type of its field
>> ‘link_intrastage_shaders(void*, gl_context*, gl_shader_program*,
>> gl_shader**, unsigned int)::array_sizing_visitor::<anonymous>’
>> linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
>> gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
>> declared with greater visibility than its base
>> ‘ir_hierarchical_visitor’
>> ar: creating libglsl.a
>>
>>
>> Can someone fix that?
>>
>> -Brian
>
>
> This is really weird...I've never seen this.
>
> What version of g++ are you using?  Ian and I both use 4.6.

On this particular Ubuntu distro on my laptop:

$ g++ --version
g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

I've got newer distros on my other systems but don't have access to
them right now.  It's probably not a big deal if you're not seeing it
with newer g++.


> You might try splitting the class declaration and variable declaration and
> see if that helps:
>
> i.e.
>
>      class array_sizing_visitor : public ir_hierarchical_visitor {
>         ...
>      };
>      array_sizing_visitor v;

That didn't seem to make any difference.  But Ian's suggestion of
moving the class outside the function worked.

-Brian


More information about the mesa-dev mailing list