Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: C23 (C2x) changes Date: Sat, 02 Oct 2021 08:55:46 -0700 Organization: A noiseless patient Spider Lines: 26 Message-ID: <86h7dzs9od.fsf@linuxsc.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="394007ef4ff0447a8819fcdafe9c3245"; logging-data="22007"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v+WQ3Awl05Cbs9Y/koafYFiUsq++/04A=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:9iEyjdy0vlTGyOFkFV2cWQrJcH8= sha1:BujMxY9s2aG5ZMTGKgzOnXKyWZk= Xref: csiph.com comp.lang.c:162941 William Ahern writes: > [...] > IME [a very important pre-processor capability] is the ability to > use the defined operator in macros. I share your sense that this would be a useful capability, including the lazy evaluation aspect. However there are (or at least may be) subtle interactions that need to be worked out. For example, #define foo(x) INT_MIN < -INT_MAX || defined x or #define bas(x) defined x##_a || defined x##_b would very likely need new wording in how macro expansion works so that these and other unusual cases would be unambiguously defined. Not necessarily an easy job. Bottom line, if you think some capability in this direction is important to add to the C standard, write a proposal that covers what changes are needed, including all the oddball and corner cases, and submit it to the ISO C committee. These things don't happen unless they have a champion who has gone through much of the preliminary effort to get them incorporated into the C standard.