From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Emacs rewrite in a maintainable language Date: Tue, 13 Oct 2015 17:42:06 +0200 Message-ID: <87r3ky7p2p.fsf@fencepost.gnu.org> References: <561A19AB.5060001@cumego.com> <87io6dl0h0.fsf@wanadoo.es> <87lhb82qxc.fsf@gmail.com> <878u78b3hg.fsf@fencepost.gnu.org> <87h9lwyv33.fsf@gmail.com> <561C368F.6010306@cs.ucla.edu> <87oag3xb2i.fsf@gmail.com> <20151013114630.GA4613@acm.fritz.box> <838u76ztdm.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444751325 10305 80.91.229.3 (13 Oct 2015 15:48:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 15:48:45 +0000 (UTC) Cc: Alan Mackenzie , eggert@cs.ucla.edu, ohwoeowho@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 17:48:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zm1oZ-0006Lx-3v for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 17:48:35 +0200 Original-Received: from localhost ([::1]:37031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm1oY-00086K-J9 for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 11:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm1iU-00076e-9K for emacs-devel@gnu.org; Tue, 13 Oct 2015 11:42:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zm1iT-0001b7-3t for emacs-devel@gnu.org; Tue, 13 Oct 2015 11:42:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm1iK-0001Yv-A7; Tue, 13 Oct 2015 11:42:08 -0400 Original-Received: from localhost ([127.0.0.1]:50348 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zm1iJ-0008Ro-Gi; Tue, 13 Oct 2015 11:42:07 -0400 Original-Received: by lola (Postfix, from userid 1000) id CD5EFDF4F8; Tue, 13 Oct 2015 17:42:06 +0200 (CEST) In-Reply-To: <838u76ztdm.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Oct 2015 18:21:41 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191481 Archived-At: Eli Zaretskii writes: >> Date: Tue, 13 Oct 2015 11:46:30 +0000 >> From: Alan Mackenzie >> Cc: Paul Eggert , emacs-devel@gnu.org >> >> > May I ask if there's a reason to not have a single style for const >> > pointers? I get 2162 occurrences of "const char *", and 357 occurrences >> > of "char const *" in the C sources. >> >> Yes there is. The two are semantically different. In one of them, it is >> the pointer which is declared constant. In the other, it's what's >> pointed at that's constant. Though I can never remember which is which. >> :-( > > Use 'cdecl': > > cdecl> explain const char *p > declare p as pointer to const char > cdecl> explain char const *p > syntax error > cdecl> explain char * const p > declare p as const pointer to char Neither C compilers nor C++ compilers nor C standards nor C++ standards agree with that diagnosis. -- David Kastrup