diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-04-18 23:17:41 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-04-18 23:18:09 -0700 |
commit | ee163d8f5ae541bdaab0f2d23826c7e4e275846b (patch) | |
tree | e9e79a05276285c3b88f7e57e1c1ec3fb2a132a7 /configure.ac | |
parent | f08497935213250eb1aba9604a5418f2f7c41880 (diff) | |
download | grep-ee163d8f5ae541bdaab0f2d23826c7e4e275846b.tar.gz |
dfa: fix pointer type conversion bug
The code converted between size_t * and ptrdiff_t *, which wasn't
diagnosed by modern x86-64 GCC but isn't portable. Problem
reported by Norihiro Tanaka in <http://bugs.gnu.org/17136#31>.
* configure.ac (WERROR_CFLAGS): Don't add -Wno-pointer-sign.
We want GCC to diagnose pointer signedness problems, as they
violate the C standard and other compilers no doubt complain too.
* src/dfa.c (struct dfa): Change type of salloc to size_t.
(realloc_trans_if_necessary): Convert signed value to size_t before
passing its address to x2nrealloc. Changing the type of tralloc
to size_t might have led to problems elsewhere.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 886449b9..17a8920c 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ if test "$gl_gcc_warnings" = yes; then done gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now - gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now # In spite of excluding -Wlogical-op above, it is enabled, as of |