Bug 27004 - [GLSL] allowing macro redefinition
[GLSL] allowing macro redefinition
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Other
git
All All
: low minor
Assigned To: Ian Romanick
:
Depends on:
Blocks: 29044
  Show dependency treegraph
 
Reported: 2010-03-10 17:14 UTC by Gordon Jin
Modified: 2010-08-22 18:16 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-03-10 17:14:45 UTC
piglit/tests/glslparsertest/shaders/preprocess1.frag gets pass with mesa:

It seems the test case expects to get fail with macro t2 redefinition (and the redefinition is not "effectively the same").

// tests for macro redifinition (t2) and the #if and #else nestings.
// takes care of elif also. 

#define t1 (1+2) 
#define t2 2
#define t2 3 

...
Comment 1 Eric Anholt 2010-08-22 17:43:13 UTC
commit 3882cf21696d2576bd3d855dbc97c9354f72a15f
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Aug 17 23:20:58 2010 -0700

    glcpp: Add support for "redefined macro" error.
    
    Carefully avoiding printing any error when the new definition matches
    the existing definition.
    
    This fixes the recently-added 088-redefine-macro-legitimate.c and
    089-redefine-macro-error.c tests as well as glsparsertest/preprocess1
    in piglit.
Comment 2 Gordon Jin 2010-08-22 18:16:03 UTC
verified