Skip to content
Browse files

Handle an 'f' suffix on float constants

  • Loading branch information...
1 parent 5ca773c commit 0b631da3b4494ea8f12f760d1c6294944b8c3ef1 @mstorsjo mstorsjo committed Sep 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 convert.c
View
3 convert.c
@@ -1649,6 +1649,9 @@ static double eval_prim(CXToken *tokens, unsigned *n, unsigned last) {
} else {
char *end;
double d = strtod(str, &end);
+ // Handle a possible f suffix for float constants
+ if (end != str && (*end == 'f' || *end == 'F'))
+ end++;
if (*end != '\0') {
fprintf(stderr, "Unable to parse %s as expression primary\n", str);
exit(1);

0 comments on commit 0b631da

Please sign in to comment.
Something went wrong with that request. Please try again.