Bug report: hexadecimal numbers are wrongly intented
"杨已彪" <[email protected]> Thu, 4 May 2017 15:08:19 +0800
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bug report: hexadecimal numbers are wrongly intented
Indent version: GNU indent 2.2.11
/*** test.c: original code ***/
int main() {
double a = 0x1.0p-1;
double b = 0x1.0p-974 * 0x1.fffffffffffffp+1023;
double r = 0x1.0p-100 * (0x1.0p-974 * 0x1.fffffffffffffp+1023);
printf("%f\n%f\n%f\n", a, b, r);
}
Command: $indent test.c
/*** test.c: indented code ***/
int
main ()
{
double a = 0x1 .0 p - 1;
double b = 0x1 .0 p - 974 * 0x1.fffffffffffffp + 1023;
double r = 0x1 .0 p - 100 * (0x1 .0 p - 974 * 0x1.fffffffffffffp + 1023);
printf ("%f\n%f\n%f\n", a, b, r);
}
/***
e.g. hexadecimal numbers "0x1.0p-1" is wrongly intented as "0x1 .0 p - 1"
error occurs while compiling the indented code
***/
Thanks!
------------------
Yibiao Yang
[email protected]