thanks for such a great library! I'm really suprised to be the first
one reporting this (or just don't know how to google). Anyway, it
seems that gmock generates lots of warnings when built with gcc
-pedantic. Depending on the standard used:
cc1plus: warnings being treated as errors
/home/spunt/svn/gmock/src/gtest/include/gtest/gtest-typed-test.h:239:46:
error: anonymous variadic macros were introduced in C99
In file included from /home/spunt/svn/gmock/src/include/gmock/gmock.h:58,
from src/test/be795.cpp:4:
/home/spunt/svn/gmock/src/include/gmock/gmock-actions.h:116:52: error:
invoking macro GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ a gument
2: empty macro arguments are undefined in ISO C90 and ISO C++98
In file included from /home/spunt/svn/gmock/src/include/gmock/gmock.h:60,
from src/test/be795.cpp:4:
/home/spunt/svn/gmock/src/include/gmock/gmock-generated-actions.h:2267:1:
error: invoking macro GMOCK_CONCAT_TOKEN_IMPL_ argument 2: empty macro
arguments are undefined in ISO C90 and ISO C++98
...
Or eg. with -std=c++0x:
cc1plus: warnings being treated as errors
In file included from
/home/spunt/svn/gmock/src/include/gmock/gmock-printers.h:103,
from
/home/spunt/svn/gmock/src/include/gmock/gmock-actions.h:46,
from /home/spunt/svn/gmock/src/include/gmock/gmock.h:58,
from src/test/be795.cpp:4:
/home/spunt/svn/gmock/src/include/gmock/internal/gmock-internal-utils.h:465:
error: comma at end of enumerator list
gmock version used: 1.5.0
Ofc it's not critical but it'd be nice to have it fixed.
Thanks,
Vladimir.
Thanks,
Vladimir.
I have fixed the last warning in r503, but I don't think we can do much about variadic macros. They are essential for typed tests, and you can only get rid of the warning if you disable them.