ISO C comments fix
This commit is contained in:
parent
d13763892e
commit
15a9ce36f8
2 changed files with 6 additions and 6 deletions
|
|
@ -6854,11 +6854,11 @@ exprcompound : expr PLUS expr {
|
|||
}
|
||||
| expr LESSEQUALGREATER expr {
|
||||
$$.val = NewStringf("%s <=> %s", COMPOUND_EXPR_VAL($1), COMPOUND_EXPR_VAL($3));
|
||||
// Really `<=>` returns one of `std::strong_ordering`,
|
||||
// `std::partial_ordering` or `std::weak_ordering`, but we
|
||||
// fake it by treating the return value as `int`. The main
|
||||
// thing to do with the return value in this context is to
|
||||
// compare it with 0, for which `int` does the job.
|
||||
/* Really `<=>` returns one of `std::strong_ordering`,
|
||||
* `std::partial_ordering` or `std::weak_ordering`, but we
|
||||
* fake it by treating the return value as `int`. The main
|
||||
* thing to do with the return value in this context is to
|
||||
* compare it with 0, for which `int` does the job. */
|
||||
$$.type = T_INT;
|
||||
}
|
||||
| expr QUESTIONMARK expr COLON expr %prec QUESTIONMARK {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ int Preprocessor_expr(DOH *s, int *error) {
|
|||
/* A number. Reduce EXPR_TOP to an EXPR_VALUE */
|
||||
char *c = Char(Scanner_text(scan));
|
||||
if (c[0] == '0' && (c[1] == 'b' || c[1] == 'B')) {
|
||||
// strtol() doesn't handle binary constants.
|
||||
/* strtol() doesn't handle binary constants */
|
||||
stack[sp].value = (long) strtol(c + 2, 0, 2);
|
||||
} else {
|
||||
stack[sp].value = (long) strtol(c, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue