dascandy / hippomocks

GNU Lesser General Public License v2.1
196 stars 67 forks source link

Fix Werror on redecleration of __clear_cache #79

Closed mnhu closed 7 years ago

mnhu commented 7 years ago

When building for ARM targets using (at least) gcc-6.3, the build fails with:

hippomocks.h:114:17: error: new declaration 'void __clear_cache(char, char)' ambiguates built-in dec laration 'void __clear_cache(void, void)' [-Werror]

According to LLVM revision 181810[1] the gcc manual is wrong, and the decleration should use void pointers.

[1] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20130513/079828.html

Signed-off-by: Martin Hundebøll mnhu@prevas.dk

dascandy commented 7 years ago

Sounds OK to me. Thanks!

mnhu commented 7 years ago

Sorry, I pulled the tricker too fast. Do you want a new PR ?

dascandy commented 7 years ago

Why that? It looks fine for me. The Appveyor build is only set up for the c++11 branch, so I'm ignoring it for this main line pull request.

mnhu commented 7 years ago

Well, it doesn't really fix the build, as built-in's cannot be checked with #ifndefs - I just made wrong conclusions when testing. I am preparing a new PR which will show a proper fix.

dascandy commented 7 years ago

I was wondering how it worked, but wasn't going to doubt it as I expected you to have tested it. I don't think I can set up a Travis ARM build so I can't auto-test it either. I'll wait for the new pull request.