Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: gcc_centric C code Date: Fri, 27 Apr 2018 09:11:54 -0700 Organization: None to speak of Lines: 22 Message-ID: References: <87tvrzpa32.fsf@bsb.me.uk> <29063935-b373-4307-be80-78a64134d0e7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="cc0e2a6c7d0567601a378dba59302632"; logging-data="19828"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7Ics8f7BO6MrEJW19ZaH9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:wViJkcK/pXz45II5Q6fz3AtyPvA= sha1:DjpnHLa0KP+JUNj7sPGm54jMZzE= Xref: csiph.com comp.lang.c:129858 Tim Rentsch writes: > Keith Thompson writes: >> Robert Wessel writes: >>> [contrasting __func__ and string-literal predefined macros] >> >> A very minor point: values yielded by __func__ can be compared for >> pointer equality. > > So can values of string-literal predefined macros. Can be *meaningfully* compared. This: printf("%d\n", __FILE__ == __FILE__); could print either 0 or 1. The value of __func__ for a given non-inline function is always the same. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"