about summary refs log tree commit diff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-15 16:03:58 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-15 16:03:58 -0700
commit329bc0186823da075e1a41aab9a4cdc78fb858aa (patch)
tree8a85b7428d66a53ba9c5a0c9f41b1a01f52388c0 /posix/regcomp.c
parente04e272d21d57a5e84af253c085a80de9b2f7e9f (diff)
downloadglibc-329bc0186823da075e1a41aab9a4cdc78fb858aa.tar.gz
glibc-329bc0186823da075e1a41aab9a4cdc78fb858aa.tar.xz
glibc-329bc0186823da075e1a41aab9a4cdc78fb858aa.zip
Suppress regcomp.c warnings in 32-bit builds.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 373a52ecff..e85b235145 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -932,8 +932,12 @@ init_word_char (re_dfa_t *dfa)
     {
       if (sizeof (dfa->word_char[0]) == 8)
 	{
-	  dfa->word_char[0] = UINT64_C (0x03ff000000000000);
-	  dfa->word_char[1] = UINT64_C (0x07fffffe87fffffe);
+          /* The extra temporaries here avoid "implicitly truncated"
+             warnings in the case when this is dead code, i.e. 32-bit.  */
+          const uint64_t wc0 = UINT64_C (0x03ff000000000000);
+          const uint64_t wc1 = UINT64_C (0x07fffffe87fffffe);
+	  dfa->word_char[0] = wc0;
+	  dfa->word_char[1] = wc1;
 	  i = 2;
 	}
       else if (sizeof (dfa->word_char[0]) == 4)