bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug report: hexadecimal numbers are wrongly intented


From: 杨已彪
Subject: Bug report: hexadecimal numbers are wrongly intented
Date: Thu, 4 May 2017 16:42:47 +0800

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
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]