diff options
author | Nathan Binkert <nate@binkert.org> | 2009-05-12 22:33:05 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-05-12 22:33:05 -0700 |
commit | 0c2b9cf90dc7c63f8d102a0d4285101a03bc5b91 (patch) | |
tree | 78b424b805503e246d9af9457a16ddd8f8617cc4 /src/mem/slicc/parser | |
parent | d923ce0f8ca6a534b1127664792b936f22677a77 (diff) | |
download | gem5-0c2b9cf90dc7c63f8d102a0d4285101a03bc5b91.tar.xz |
slicc: work around improper initialization of a global in slicc.
Diffstat (limited to 'src/mem/slicc/parser')
-rw-r--r-- | src/mem/slicc/parser/parser.yy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/slicc/parser/parser.yy b/src/mem/slicc/parser/parser.yy index 8090b88f7..724184665 100644 --- a/src/mem/slicc/parser/parser.yy +++ b/src/mem/slicc/parser/parser.yy @@ -337,7 +337,7 @@ DeclListAST* parse(string filename) exit(1); } g_line_number = 1; - g_file_name = filename; + g_file_name() = filename; yyin = file; g_decl_list_ptr = NULL; yyparse(); @@ -346,7 +346,7 @@ DeclListAST* parse(string filename) extern "C" void yyerror(char* s) { - fprintf(stderr, "%s:%d: %s at %s\n", g_file_name.c_str(), g_line_number, s, yytext); + fprintf(stderr, "%s:%d: %s at %s\n", g_file_name().c_str(), g_line_number, s, yytext); exit(1); } |