/* According to the GLSL specification, macro names starting with "__"
* or "GL_" are reserved for future use. So, don't allow them.
*/
- if (strncmp(identifier, "__", 2) == 0) {
- glcpp_error (loc, parser, "Macro names starting with \"__\" are reserved.\n");
+ if (strstr(identifier, "__")) {
+ glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n");
}
if (strncmp(identifier, "GL_", 3) == 0) {
glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
-0:1(10): preprocessor error: Macro names starting with "__" are reserved.
+0:1(10): preprocessor error: Macro names containing "__" are reserved.
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
+0:3(9): preprocessor error: Macro names containing "__" are reserved.
+
+