Re: Compiling OpenShadingLanguage under Windows

Chris Foster <chri...@...>

On Sun, Jan 17, 2010 at 8:25 AM, Oleg <ode...@...> wrote:
| simple_typename IDENTIFIER arrayspec initializer_list
                    TypeDesc simple = lextype ($1);
                    simple.arraylen = $3;
                    TypeSpec t (simple, t.is_closure
());                                        // <--- LINE 274
                    ASTvariable_declaration *var;
                    var = new ASTvariable_declaration (oslcompiler,
                                     ustring ($2), $4, false,
                                     true /* ismeata */, false /
*output */,
                                     true /* initializer list */);
                    $$ = var;

I'm not familiar with bison... Any help is welcome :-)
The chunk of code between the '{' and '}' is just C++ (mostly, except for the
$ markers of course). Looking at this, the line

TypeSpec t (simple, t.is_closure());

doesn't make any sense to me, since it appears to use t before it's constructed.
(Why does this even compile elsewhere? Maybe there's another variable t in the

To me it seems this should be

TypeSpec t (simple, false);

since the metadata can never be a closure. I'm not an expert though (not by
any means!); does this sound right guys?


Join to automatically receive all group messages.