Re: type safe lists (was Re: PATCH: type safe(r) list_entry repacement: generic_out_cast)

Roland Dreier (roland@topspin.com)
24 Jul 2002 23:20:10 -0700


Martin> By the way: Multiline C Macros are depreached and will not
Martin> be supported by a future version of gcc and as for today
Martin> will generate a bunch of warnings.

Greg> Why is this? Is it a C99 requirement?

I'm not sure what Martin is talking about here. I'm sure that
multiline macros are part of standard C. The second translation phase
(immediately after character set mapping but _before_ preprocessing)
deletes any occurrences of \ followed by a newline. The preprocessor
should not behave differently if a macro definition is broken up with \'s.

The copy of the ISO C standard that I have (the August 3, 1998 draft)
even has an example of a macro with a multiline definition in the
section on macro replacement.

I really doubt that gcc will break this standards-compliant,
extensively-used behavior. Perhaps I misunderstood Martin but I don't
think there was anything wrong syntactically with the list macros
posted earlier.

Best,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/