expr.c (interpret_float_suffix): Add a guard.

2012-05-10  Tristan Gingold  <gingold@adacore.com>

	* expr.c (interpret_float_suffix): Add a guard.

From-SVN: r187364
This commit is contained in:
Tristan Gingold 2012-05-10 08:04:18 +00:00 committed by Tristan Gingold
parent 3ac8781c36
commit 638d20652b
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2012-05-10 Tristan Gingold <gingold@adacore.com>
* expr.c (interpret_float_suffix): Add a guard.
2012-05-02 Dodji Seketeli <dodji@redhat.com>
Properly initialize cpp_context in destringize_and_run

View File

@ -110,12 +110,13 @@ interpret_float_suffix (const uchar *s, size_t len)
}
/* Recognize a fixed-point suffix. */
switch (s[len-1])
{
case 'k': case 'K': flags = CPP_N_ACCUM; break;
case 'r': case 'R': flags = CPP_N_FRACT; break;
default: break;
}
if (len != 0)
switch (s[len-1])
{
case 'k': case 'K': flags = CPP_N_ACCUM; break;
case 'r': case 'R': flags = CPP_N_FRACT; break;
default: break;
}
/* Continue processing a fixed-point suffix. The suffix is case
insensitive except for ll or LL. Order is significant. */