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

From: Roland Dreier (roland@topspin.com)
Date: Thu Jul 25 2002 - 01:20:10 EST


    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/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:18 EST