summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorMitchell Blank Jr <[email protected]>2012-05-20 00:06:49 -0700
committerMitchell Blank Jr <[email protected]>2012-05-20 00:06:49 -0700
commit42c6b324db6141d05726beec531ae19bd83e85f0 (patch)
tree9d7fb4d8fe22721e1ccf53eca956895f141176ed /src/parse.y
parent8c752c73e21d9be1934a8440caa0481c35deb8ad (diff)
downloadmruby-42c6b324db6141d05726beec531ae19bd83e85f0.tar.gz
mruby-42c6b324db6141d05726beec531ae19bd83e85f0.zip
C++ compilability -- don't jump across variable initialization
C++ is picker than C about when you can "goto" across a variable being defined. The fix is to just minimize the variable's scope inside an extra set of brackets. Without this change, g++ has the following errors: transcode.c:590: error: jump to label 'resume_label3' transcode.c:514: error: from here transcode.c:582: error: crosses initialization of 'const unsigned char* p' transcode.c:2124: error: jump to label 'set_encs' transcode.c:2184: error: from here transcode.c:2088: error: skips initialization of 'const char* err' transcode.c:2089: error: skips initialization of 'size_t error_len' transcode.c:2090: error: skips initialization of 'mrb_value bytes' transcode.c:2091: error: skips initialization of 'mrb_value dumped' transcode.c:2092: error: skips initialization of 'size_t readagain_len' transcode.c:2093: error: skips initialization of 'mrb_value bytes2'
Diffstat (limited to 'src/parse.y')
0 files changed, 0 insertions, 0 deletions