emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows 64 port


From: Fabrice Popineau
Subject: Re: Windows 64 port
Date: Thu, 1 Mar 2012 08:04:41 +0100

Suppose someone proposed lots of patches like this:

-  size_t len = strlen (string);
+  size_t const len = strlen (string);

on the grounds that the XYZ Corp. compiler warns whenever
code fails to use 'const' at every opportunity.
That would be bogus -- that's not the Emacs
programming style, and we shouldn't slavishly alter
mainstream code merely to pacify a third-party compiler
that prefers a different style.


The const fixes I proposed are easily isolated: they affect only the src/regex.c file.
You are free to submit it or to forget about it.
In this file, const is used in a few places only, resulting in dozens of warnings. Either
remove the use of const or use it everywhere it is needed. 
There is always the option to #define const to nothing, but I won't favor it.

Fabrice

reply via email to

[Prev in Thread] Current Thread [Next in Thread]