This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-199-g329bc01


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  329bc0186823da075e1a41aab9a4cdc78fb858aa (commit)
      from  e04e272d21d57a5e84af253c085a80de9b2f7e9f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=329bc0186823da075e1a41aab9a4cdc78fb858aa

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    3 +++
 posix/regcomp.c |    8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a31fa48..3f7759e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-08-15  Roland McGrath  <roland@hack.frob.com>
 
+	* posix/regcomp.c (init_word_char): Use temporaries to hold the 64-bit
+	constants, which avoids warnings in 32-bit builds.
+
 	* bits/fcntl.h [__USE_POSIX199309 || __USE_UNIX98]:
 	(O_DSYNC, O_RSYNC): New macros (with NetBSD values).
 
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 373a52e..e85b235 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)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]