mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
Bug 394048 - parser confusion about octal double
Change-Id: I4184acdeb4909022a2e2b30830530bd33a4897f3 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/15839 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
5cb56f98bc
commit
c68190a67c
2 changed files with 13 additions and 3 deletions
|
@ -7461,4 +7461,9 @@ public class AST2Tests extends AST2TestBase {
|
|||
public void testFunctionReturningFunctionPointer_413204() throws Exception {
|
||||
parseAndCheckBindings(getAboveComment(), CPP);
|
||||
}
|
||||
|
||||
// double d = 00.9;
|
||||
public void testOctalFloatingPointLiteral_394048() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -976,13 +976,18 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
++pos;
|
||||
break;
|
||||
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7':
|
||||
if (!isFloat)
|
||||
isOctal = true;
|
||||
++pos;
|
||||
break;
|
||||
case '8': case '9':
|
||||
if (!isFloat) {
|
||||
handleProblem(IProblem.SCANNER_BAD_OCTAL_FORMAT, image, number.getOffset(), number.getEndOffset());
|
||||
return;
|
||||
}
|
||||
++pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue