Changeset 5546eee4 for src/ControlStruct/MultiLevelExit.cpp
- Timestamp:
- Dec 16, 2023, 1:01:44 AM (22 months ago)
- Branches:
- master
- Children:
- b7898ac
- Parents:
- 0fa0201d (diff), 69ab896 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/MultiLevelExit.cpp
r0fa0201d r5546eee4 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Nov 1 13:48:00 2021 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Sep 8 17:04:00202313 // Update Count : 3 611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Dec 14 17:34:12 2023 13 // Update Count : 39 14 14 // 15 15 … … 254 254 if ( enclosing_control_structures.empty() ) { 255 255 SemanticError( stmt->location, 256 " 'break' outside a loop, 'switch', or labelled block" );256 "\"break\" outside a loop, \"switch\", or labelled block" ); 257 257 } 258 258 targetEntry = findEnclosingControlStructure( isBreakTarget ); … … 268 268 // Ensure that selected target is valid. 269 269 if ( targetEntry == enclosing_control_structures.rend() || ( isContinue && ! isContinueTarget( *targetEntry ) ) ) { 270 SemanticError( stmt->location, toString( (isContinue ? " 'continue'" : "'break'"),270 SemanticError( stmt->location, toString( (isContinue ? "\"continue\"" : "\"break\""), 271 271 " target must be an enclosing ", (isContinue ? "loop: " : "control structure: "), 272 272 stmt->originalTarget ) ); … … 279 279 // Check that target is valid. 280 280 if ( targetEntry == enclosing_control_structures.rend() ) { 281 SemanticError( stmt->location, " 'fallthrough' must be enclosed in a 'switch' or 'choose'" );281 SemanticError( stmt->location, "\"fallthrough\" must be enclosed in a \"switch\" or \"choose\"" ); 282 282 } 283 283 if ( ! stmt->target.empty() ) { 284 284 // Labelled fallthrough: target must be a valid fallthough label. 285 285 if ( ! fallthrough_labels.count( stmt->target ) ) { 286 SemanticError( stmt->location, toString( " 'fallthrough'target must be a later case statement: ",286 SemanticError( stmt->location, toString( "\"fallthrough\" target must be a later case statement: ", 287 287 stmt->originalTarget ) ); 288 288 } … … 296 296 // Check if in switch or choose statement. 297 297 if ( targetEntry == enclosing_control_structures.rend() ) { 298 SemanticError( stmt->location, " 'fallthrough' must be enclosed in a 'switch' or 'choose'" );298 SemanticError( stmt->location, "\"fallthrough\" must be enclosed in a \"switch\" or \"choose\"" ); 299 299 } 300 300 … … 309 309 } 310 310 if ( ! foundDefault ) { 311 SemanticError( stmt->location, " 'fallthrough default' must be enclosed in a 'switch' or 'choose'"312 "control structure with a 'default'clause" );311 SemanticError( stmt->location, "\"fallthrough default\" must be enclosed in a \"switch\" or \"choose\"" 312 "control structure with a \"default\" clause" ); 313 313 } 314 314 break; … … 338 338 // Check that fallthrough default comes before the default clause. 339 339 if ( ! targetEntry->isFallDefaultValid() ) { 340 SemanticError( stmt->location, " 'fallthrough default' must precede the 'default'clause" );340 SemanticError( stmt->location, "\"fallthrough default\" must precede the \"default\" clause" ); 341 341 } 342 342 break; … … 521 521 assert(0); 522 522 } 523 SemanticError( stmt->location, toString( "'return' may not appear in a ", context ));523 SemanticError( stmt->location, "\"return\" may not appear in a %s", context ); 524 524 } 525 525
Note:
See TracChangeset
for help on using the changeset viewer.