Skip to content

Instantly share code, notes, and snippets.

@Constellation
Created October 1, 2014 14:22
Show Gist options
  • Select an option

  • Save Constellation/05dd4b86c60a8db11db3 to your computer and use it in GitHub Desktop.

Select an option

Save Constellation/05dd4b86c60a8db11db3 to your computer and use it in GitHub Desktop.
Index: ocelot/ocelot/parser/interface/PTXLexer.h
===================================================================
--- ocelot/ocelot/parser/interface/PTXLexer.h (revision 2259)
+++ ocelot/ocelot/parser/interface/PTXLexer.h (working copy)
@@ -8,7 +8,14 @@
#ifndef PTX_LEXER_H_INCLUDED
#define PTX_LEXER_H_INCLUDED
+// FIXME: From the some version of bison, generated header contains yyparse
+// function prototype. Because it uses undeclared nested class and it contains
+// circular reference, we cannot build it with this prototype.
+// To avoid this compile error, we replace `yyparse(...)` to
+// `dummy_yyparse_to_avoid_compile_error(void)` by using C macro.
+#define yyparse(...) dummy_yyparse_to_avoid_compile_error(void)
#include <ptxgrammar.hpp>
+#undef yyparse
namespace parser
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment