techoe / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Fix build with C++11 #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to build with C++11
2.  Build fails

What is the expected output? What do you see instead?
Successful build.

Build failure.

error: invalid suffix on literal; C++11 requires a space between literal and 
identifier 

What version of the product are you using? On what operating system?
gcc 4.7 and clang 3.0 on OS X

Please provide any additional information below.

in gflags.cc a space needs to be put between the format specifiers and the "%" 
to fix the build

      snprintf(intbuf, sizeof(intbuf), "%"PRId32, VALUE_AS(int32));

      snprintf(intbuf, sizeof(intbuf), "%" PRId32, VALUE_AS(int32));
                                                         ^ Space here

Original issue reported on code.google.com by whatmann...@gmail.com on 28 May 2012 at 2:51

GoogleCodeExporter commented 9 years ago
Thanks for reporting. I applied the changes the trunk r77 and tested the 
compilation with GCC 4.7 with -std=c++0x option.

Original comment by andreas....@gmail.com on 29 May 2012 at 3:21

GoogleCodeExporter commented 9 years ago
Issue 56 has been merged into this issue.

Original comment by andreas....@gmail.com on 15 Aug 2012 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 20 Mar 2014 at 3:30