Date
1 - 5 of 5
Fix errors and warnings from g++-4.4.1 (issue193074)
Blair Zajac <bl...@...>
On Jan 23, 2010, at 9:01 PM, chri...@... wrote:
Reviewers: osl-dev_googlegroups.com,You could do what Google Protocol Buffers does and determine which hash map to use at configure time. It works with g++ 3.4.x all the way up to 4.4.x. See the m4 file at: http://code.google.com/p/protobuf/source/browse/trunk/m4/stl_hash.m4 Protocol Buffers has a new BSD license so this could be copied straight from them. Running configure on my Ubuntu Karmic system with g++ 4.4.1 shows checking the location of hash_map... <tr1/unordered_map> Regards, Blair |
|
chri...@...
On 2010/01/24 08:26:12, blair wrote:
You could do what Google Protocol Buffers does and determine whichhash map to use at configure time. It works with g++ 3.4.x all the way up to4.4.x. See the m4 file at: http://code.google.com/p/protobuf/source/browse/trunk/m4/stl_hash.m4IMHO this seems to be a bit of overkill, and my preferred option would be just to specify that >=boost-1.36 was necessary. However I know that may not be an option for everyone so I'll let the OSL core developers chime in. What's the story guys? I'll note that using hash_map *does* compile with g++-4.4.1, but not without warnings (and hence doesn't compile when using -Werror which is turned on by default in the build scripts). Protocol Buffers has a new BSD license so this could be copiedstraight from them.The M4 would have to be converted to cmake, but it's good to see all the potential places which hash_map may reside. Gosh there's a lot! http://codereview.appspot.com/193074/show |
|
Wormszer <worm...@...>
I too recieved an error from strcmp in oslex.l/cpp when building with visual studio.
toggle quoted message
Show quoted text
Visual studio has not deprecated hash_map from what i can tell, but a boost solution would work there as well. Does the gcc build really generate no warnings, i guess it must not with the compiler flags to make warnings errors? I just built oslcomp and I get about 3800 warnings, this is displaying all warnings. Just picking one example some functions don't have a return in the default switch case, even though the default switch case has a ASSERT macro that calls abort, VS throws a warning. Jeremy On Sun, Jan 24, 2010 at 4:28 AM, <chri...@...> wrote:
|
|
Wormszer <worm...@...>
Actually my error was strchr returning a char* instead of a const char*. osolex.l line# 260
toggle quoted message
Show quoted text
On Sun, Jan 24, 2010 at 3:44 PM, Wormszer <worm...@...> wrote: I too recieved an error from strcmp in oslex.l/cpp when building with visual studio. |
|
Chris Foster <chri...@...>
On Mon, Jan 25, 2010 at 7:02 AM, Wormszer <worm...@...> wrote:
Actually my error was strchr returning a char* instead of a const char*.Yeah, I believe that's fixed in the patch. On Sun, Jan 24, 2010 at 3:44 PM, Wormszer <worm...@...> wrote:From what I can tell, the latest visual studio has a native unordered_map implementation, but my preference for boost is just because it's consistent across all platforms. Yep.Does the gcc build really generate no warnings, i guess it must not with This is to be expected really; all the different compilers haveI just built oslcomp and I get about 3800 warnings, this is displaying all somewhat different ways of checking for suspicious code, and the compiler authors have different standards about what they consider "suspicious" ;-) ~Chris |
|