Skip to content

Commit 394f738

Browse files
committed
Fix strbuf for gcc 4.8.2
1 parent 6f5a764 commit 394f738

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/parser/flex_lexer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ YY_RULE_SETUP
31933193
case 154:
31943194
YY_RULE_SETUP
31953195
#line 249 "flex_lexer.l"
3196-
{ BEGIN singlequotedstring; strbuf = std::stringstream{}; }
3196+
{ BEGIN singlequotedstring; strbuf.clear(); strbuf.str(""); } // Clear strbuf manually, see #170
31973197
YY_BREAK
31983198
case 155:
31993199
YY_RULE_SETUP

src/parser/flex_lexer.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ COMMIT TOKEN(COMMIT)
246246
return SQL_IDENTIFIER;
247247
}
248248

249-
\' { BEGIN singlequotedstring; strbuf = std::stringstream{}; }
249+
\' { BEGIN singlequotedstring; strbuf.clear(); strbuf.str(""); } // Clear strbuf manually, see #170
250250
<singlequotedstring>\'\' { strbuf << '\''; }
251251
<singlequotedstring>[^']* { strbuf << yytext; }
252252
<singlequotedstring>\' { BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; }

0 commit comments

Comments
 (0)