summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-06-12 19:13:55 -0400
committerMengchi Zhang <[email protected]>2019-06-12 19:13:55 -0400
commite5447646aaca133f2cc5cbafcaf7aeef4b384c62 (patch)
treeada059a62e896440245e7c5de9e7c69ed3c24406 /src/cuda-sim/ptx.l
parent5530b51c7c572d25717ad7f5d81196011dfcb540 (diff)
Add some vars in ptx_parser
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/cuda-sim/ptx.l')
-rw-r--r--src/cuda-sim/ptx.l3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l
index 2546a99..18952a9 100644
--- a/src/cuda-sim/ptx.l
+++ b/src/cuda-sim/ptx.l
@@ -452,14 +452,13 @@ breakaddr TC; yylval->int_value = BREAKADDR_OP; return OPCODE;
<INITIAL,NOT_OPCODE,IN_FUNC_DECL>. TC; ptx_error(yyscanner, recognizer, (const char*)NULL);
%%
-extern int g_error_detected;
extern const char *g_filename;
int ptx_error( yyscan_t yyscanner, ptx_recognizer* recognizer, const char *s )
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
int i;
- g_error_detected = 1;
+ recognizer->g_error_detected = 1;
fflush(stdout);
if( s != NULL )
printf("%s:%u Syntax error:\n\n", g_filename, yylineno );