public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* C90 header compatibility
@ 2023-01-30  7:58 Florian Weimer
  2023-01-30 12:26 ` Siddhesh Poyarekar
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2023-01-30  7:58 UTC (permalink / raw)
  To: libc-alpha; +Cc: Siddhesh Poyarekar

We regressed compatibility with C90 compilers because <sys/cdefs.h>
unconditionally uses variadic macros, a C99 feature, in the definition
of __glibc_fortify and __glibc_fortify_n.

This also impacts certain C++ compilers that do not have a
C99-compatible preprocessor.

Should we fix this?  I think so.

Previously, we worked around this by enclosing variable-length lists in
(…), but it doesn't look like it might work here.  We probably need to
move the macros into a separate file, and include that file only if
fortification is active.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-01 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30  7:58 C90 header compatibility Florian Weimer
2023-01-30 12:26 ` Siddhesh Poyarekar
2023-01-30 12:43   ` Florian Weimer
2023-01-30 13:32     ` [PATCH] cdefs: Limit definition of fortification macros Siddhesh Poyarekar
2023-02-01 17:48       ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).