Floating point constants default to double precision and can be made
single precision with a 'f' or 'F' suffix or long double precision
with 'l' or 'L'.

It turns out indent only knows about 'u'/'U' and 'l'/'L' suffixes and
will add a space between floating point constants and the suffix if
'f' or 'F' is used which results in code that won't compile.

This particular problem broke the build of Mesa master on at least
OpenBSD/FreeBSD/Mac OS X:
https://bugs.freedesktop.org/show_bug.cgi?id=88335

Index: lexi.c
===================================================================
RCS file: /cvs/src/usr.bin/indent/lexi.c,v
retrieving revision 1.17
diff -u -p -r1.17 lexi.c
--- lexi.c      11 Oct 2014 03:05:48 -0000      1.17
+++ lexi.c      16 Jan 2015 13:07:26 -0000
@@ -202,6 +202,12 @@ lexi(void)
                }
                break;
            }
+           if (!(seensfx & 1) &&    
+               (*buf_ptr == 'F' || *buf_ptr == 'f')) {
+               CHECK_SIZE_TOKEN;
+               *e_token++ = *buf_ptr++;
+               seensfx |= 1;
+           }
        }
        else
            while (chartype[(int)*buf_ptr] == alphanum) {       /* copy it over 
*/

Reply via email to