On Wed, Mar 11, 2020 at 12:33:52PM +0100, Oleg Nesterov wrote: > and just in case... there are other cases when GCC and sparse differ, > > if, within a macro invocation, that macro is redefined, then the new > definition takes effect in time for argument pre-expansion, but the > original definition is still used for argument replacement. Here is a > pathological example: > > #define f(x) x x > f (1 > #undef f > #define f 2 > f) > > which expands to > > 1 2 1 2 > > ./sparse -E outputs > > /tmp/M.c:3:1: error: directive in macro's argument list > /tmp/M.c:4:1: error: directive in macro's argument list > 2 Not much, indeed. But I see that sparse & gcc differ also in the non-erroneous case: #define f(x) x x f(1 2) (Sparse adds newlines after the 1s) but it seems easy to solve. -- Luc