On Mon, May 18, 2020 at 9:20 PM Gregory Nutt <spudan...@gmail.com> wrote:
> > > ... Either way, the left edge of the comment will not line up > > with the "define" or "undef." > > This is the perfect illustration of the problem of mixing the > incompatible C and pre-processor indentation. Visually, you eye is > drawn to want to align the C code with the pre-processor indentation. > But that is wrong > > C indentation follows its own rules and should not be affected in any > way by the presence or absence of pre-processor stuff in the vicinity. > > But it is grating to look at. > > The simplest and most cosmetically acceptable fix from my point of view > would be eliminate all pre-processor indentation when it conflicts > visually with C indentation. The pre-processor indentation has value in > certain cases, but not so often when mixed with C code. In this case, though, it's not a mixture of preprocessor and C; rather, it's a mix of preprocessor and comments. I hesitate to eliminate all indentation in this section, because that would make the nested preprocessor logic harder to read. But I'll try to remove indentation from the comments to see how that looks and its effect on readability. Nathan