Bug 27004 - [GLSL] allowing macro redefinition
Summary: [GLSL] allowing macro redefinition
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: All All
: low minor
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
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

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


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.