Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glslang frontned behavior about scoping was wrong (GLES2.0 function body) #716

Open
johnkslang opened this issue Feb 4, 2017 · 0 comments

Comments

@johnkslang
Copy link
Member

From sawato shusaku:

int f(int k)
{
    {
        int k = k   3; // 2nd k is parameter, initializing nested first k
        int m = k      // use of new k, which is hiding the parameter
    }
}

it is leagal in GLES2.0 but is not in GLES3.0 and later

int f( /* nested scope begins here */ int k) 
{
    int k = k   3;  // redeclaration error of the name k
    ...
}

glslang frontend was wrong only GLES2.0 about this scoping problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant