Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
7d3b73bf
Commit
7d3b73bf
authored
Aug 19, 2015
by
Aaron Hamilton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'defined' cannot be used as a macro name in #define or #undef.
parent
d6c37b19
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
0 deletions
+9
-0
preprocessor.defined.vert.err
Test/baseResults/preprocessor.defined.vert.err
+4
-0
preprocessor.defined.vert.out
Test/baseResults/preprocessor.defined.vert.out
+0
-0
preprocessor.defined.vert
Test/preprocessor.defined.vert
+2
-0
test-preprocessor-list
Test/test-preprocessor-list
+1
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-0
No files found.
Test/baseResults/preprocessor.defined.vert.err
0 → 100644
View file @
7d3b73bf
ERROR: 0:2: '#define' : "defined" can't be (un)defined: defined
ERROR: 1 compilation errors. No code generated.
Test/baseResults/preprocessor.defined.vert.out
0 → 100644
View file @
7d3b73bf
Test/preprocessor.defined.vert
0 → 100644
View file @
7d3b73bf
#define defined_not_really
#define defined // ERROR: "defined" can't be (un)defined:
Test/test-preprocessor-list
View file @
7d3b73bf
...
...
@@ -11,3 +11,4 @@ preprocessor.line.frag
preprocessor.pragma.vert
preprocessor.simple.vert
preprocessor.success_if_parse_would_fail.vert
preprocessor.defined.vert
glslang/MachineIndependent/ParseHelper.cpp
View file @
7d3b73bf
...
...
@@ -2063,6 +2063,8 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
// however, before that, ES tests required an error.
if
(
strncmp
(
identifier
,
"GL_"
,
3
)
==
0
)
ppError
(
loc
,
"names beginning with
\"
GL_
\"
can't be (un)defined:"
,
op
,
identifier
);
else
if
(
strncmp
(
identifier
,
"defined"
,
8
)
==
0
)
ppError
(
loc
,
"
\"
defined
\"
can't be (un)defined:"
,
op
,
identifier
);
else
if
(
strstr
(
identifier
,
"__"
)
!=
0
)
{
if
(
profile
==
EEsProfile
&&
version
>=
300
&&
(
strcmp
(
identifier
,
"__LINE__"
)
==
0
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment