[Qt-creator] indent preprocessor directives

Nikos Chantziaras realnc at gmail.com
Sat May 5 21:31:24 CEST 2012

On 05/05/12 22:23, Jonathan S. Shapiro wrote:
> Sounds right, but before we do let's do a quick sanity check. We know
> that the GNU preprocessors, the MSFT preprocessor, and the XCode
> preprocessor all handle not-in-column-one correctly. Are there any
> *other* (potentially non-compliant) preprocessors that people are
> targeting from Qt that we may need to think about here?

I don't think that's necessary.  People using pre-1989, K&R C compilers 
(all two of them :-P) can unindent manually if needed.  But those people 
have bigger problems to worry about.  For example pre-standard C code 
does not support this:

   int foo(int a, int b)
   { /* function code */ }

but needs to be coded as:

   int foo(a, b)
   int a;
   int b;
   { /* function code */ }

Qt Creator does not support that syntax to begin with.  So it has really 
no reason to try and enforce pre-ANSI placement of "#".

More information about the Qt-creator mailing list