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