Skip to content

Commit 1a6fd8c

Browse files
committed
c++ comment warnings
1 parent a778c40 commit 1a6fd8c

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/express/entity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ bool ENTITYhas_immediate_supertype( Entity child, Entity parent ) {
392392
return false;
393393
}
394394

395-
/// called by ENTITYget_all_attributes(). \sa ENTITYget_all_attributes
395+
/** called by ENTITYget_all_attributes(). \sa ENTITYget_all_attributes */
396396
static void ENTITY_get_all_attributes( Entity entity, Linked_List result ) {
397397
LISTdo( entity->u.entity->supertypes, super, Entity )
398398
/* if (OBJis_kind_of(super, Class_Entity))*/

src/express/expr.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Type EXPresolve_op_dot( Expression expr, Scope scope ) {
321321
Variable v;
322322
Expression item;
323323
Type op1type;
324-
bool all_enums = true; //used by 'case select_'
324+
bool all_enums = true; /* used by 'case select_' */
325325

326326
/* stuff for dealing with select_ */
327327
int options = 0;
@@ -613,8 +613,8 @@ Type EXPresolve_op_group( Expression expr, Scope scope ) {
613613
}
614614
case array_:
615615
if( op1->type->u.type->body->type == self_ ) {
616-
return( Type_Runtime ); //not sure if there are other cases where Type_Runtime should be returned, or not
617-
} // else fallthrough
616+
return( Type_Runtime ); /* not sure if there are other cases where Type_Runtime should be returned, or not */
617+
} /* else fallthrough */
618618
case unknown_: /* unable to resolve operand */
619619
/* presumably error has already been reported */
620620
resolve_failed( expr );
@@ -735,7 +735,7 @@ Type EXPresolve_op_array_like( Expression e, Scope s ) {
735735
* (how?)
736736
*/
737737

738-
//count aggregates and non-aggregates, check aggregate types
738+
/* count aggregates and non-aggregates, check aggregate types */
739739
LISTdo( op1type->u.type->body->list, item, Type ) {
740740
if( TYPEis_aggregate( item ) ) {
741741
numAggr++;
@@ -755,17 +755,17 @@ Type EXPresolve_op_array_like( Expression e, Scope s ) {
755755
/* NOTE the following code returns the same data for every case that isn't an error.
756756
* It needs to be simplified or extended, depending on whether it works or not. */
757757
if( sameAggrType && ( numAggr != 0 ) && ( numNonAggr == 0 ) ) {
758-
// All are the same aggregation type
758+
/* All are the same aggregation type */
759759
return( lasttype->u.type->body->base );
760760
} else if( numNonAggr == 0 ) {
761-
// All aggregates, but different types
761+
/* All aggregates, but different types */
762762
ERRORreport_with_symbol( ERROR_warn_indexing_mixed, &e->symbol, op1type->symbol.name );
763-
return( lasttype->u.type->body->base ); // WARNING I'm assuming that any of the types is acceptable!!!
763+
return( lasttype->u.type->body->base ); /* WARNING I'm assuming that any of the types is acceptable!!! */
764764
} else if( numAggr != 0 ) {
765-
// One or more aggregates, one or more nonaggregates
765+
/* One or more aggregates, one or more nonaggregates */
766766
ERRORreport_with_symbol( ERROR_warn_indexing_mixed, &e->symbol, op1type->symbol.name );
767-
return( lasttype->u.type->body->base ); // WARNING I'm assuming that any of the types is acceptable!!!
768-
} // Else, all are nonaggregates. This is an error.
767+
return( lasttype->u.type->body->base ); /* WARNING I'm assuming that any of the types is acceptable!!! */
768+
} /* Else, all are nonaggregates. This is an error. */
769769
}
770770
ERRORreport_with_symbol( ERROR_indexing_illegal, &e->symbol );
771771
return( Type_Unknown );

src/express/resolve.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,23 +274,23 @@ void RESOLVEcleanup( void ) {
274274
*/
275275
Type TYPE_retrieve_aggregate( Type t_select, Type t_agg ) {
276276
if( TYPEis_select( t_select ) ) {
277-
// parse the underlying types
277+
/* parse the underlying types */
278278
LISTdo_links( t_select->u.type->body->list, link )
279-
// the current underlying type
279+
/* the current underlying type */
280280
Type t = ( Type ) link->data;
281281
if( TYPEis_select( t ) ) {
282282
t_agg = TYPE_retrieve_aggregate( t, t_agg );
283283
} else if( TYPEis_aggregate( t ) ) {
284284
if( t_agg ) {
285285
if( t_agg != t->u.type->body->base ) {
286-
// 2 underlying types do not have to the same base
286+
/* 2 underlying types do not have to the same base */
287287
return 0;
288288
}
289289
} else {
290290
t_agg = t->u.type->body->base;
291291
}
292292
} else {
293-
// the underlying type is neither a select nor an aggregate
293+
/* the underlying type is neither a select nor an aggregate */
294294
return 0;
295295
}
296296

@@ -434,13 +434,13 @@ void EXP_resolve( Expression expr, Scope scope, Type typecheck ) {
434434
if( !x ) {
435435
Scope enumscope = scope;
436436
while( 1 ) {
437-
// look up locally, then go through the superscopes
437+
/* look up locally, then go through the superscopes */
438438
x = DICTlookup( enumscope->enum_table, expr->symbol.name );
439439
if( x ) {
440440
break;
441441
}
442442
if( enumscope->type == OBJ_SCHEMA ) {
443-
//if we get here, this means that we've looked through all scopes
443+
/* if we get here, this means that we've looked through all scopes */
444444
x = 0;
445445
break;
446446
}
@@ -548,7 +548,7 @@ void EXP_resolve( Expression expr, Scope scope, Type typecheck ) {
548548
if( TYPEis_aggregate( expr->return_type ) ) {
549549
t = expr->u.query->aggregate->return_type->u.type->body->base;
550550
} else if( TYPEis_select( expr->return_type ) ) {
551-
// retrieve the common aggregate type
551+
/* retrieve the common aggregate type */
552552
t = TYPE_retrieve_aggregate( expr->return_type, 0 );
553553
if( !t ) {
554554
ERRORreport_with_symbol( ERROR_query_requires_aggregate, &expr->u.query->aggregate->symbol );
@@ -851,7 +851,7 @@ void CASE_ITresolve( Case_Item item, Scope scope, Statement statement ) {
851851
}
852852

853853
void STMTresolve( Statement statement, Scope scope ) {
854-
//scope is always the function/procedure/rule from SCOPEresolve_expressions_statements();
854+
/* scope is always the function/procedure/rule from SCOPEresolve_expressions_statements(); */
855855
Scope proc;
856856

857857
if( !statement ) {
@@ -932,7 +932,7 @@ void STMTresolve( Statement statement, Scope scope ) {
932932
break;
933933
case STMT_SKIP:
934934
case STMT_ESCAPE:
935-
/* do nothing */ //WARNING should we really *not* do anything for these?
935+
/* do nothing */ /* WARNING should we really *not* do anything for these? */
936936
;
937937
}
938938
}

0 commit comments

Comments
 (0)