Compilation warnings on Mac OS X 10.6 (gcc 4.2.1) (Bug #3466)


Added by Andy Maloney about 11 years ago. Updated almost 10 years ago.


Status:Cancelled Start date:2013-12-29
Priority:Low Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:core
Target version:3.1
Affected version:branch 'master' (3.0-dev) Operating System:Mac OSX
Difficulty: HW Platform:x64
Pull request:

Description

Using gcc on Mac OS X 10.6.8: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

core/base.hpp uses pragmas which are not recognised by GCC 4.2:

#ifdef __GNUC__
# if defined __clang__ || defined __APPLE__
#   pragma GCC diagnostic push
#   pragma GCC diagnostic ignored "-Winvalid-noreturn" 
# endif
#endif

...

#ifdef __GNUC__
# if defined __clang__ || defined __APPLE__
#   pragma GCC diagnostic pop
# endif
#endif

diagnostic push and pop are only available on GCC > 4.6, and diagnostic warning is not available on GCC 4.2 (at least on Apple's version).

The GCC manual suggests that using pragmas like this is discouraged (http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html#Pragmas) and that one should use function attributes (http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes).

Perhaps this could be fixed using

__attribute__ ((noreturn))
instead of descending into the #ifdef abyss?


Associated revisions

Revision 88f67ce6
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3466 from taka-no-me:ctrl_s_win

History

Updated by Anna Kogan about 11 years ago

Hello Andy,

Thank you for reporting the problem. If you could work on a solution on your side, a contribution (see How_to_contribute) would be very appreciated!

  • Status changed from New to Open

Updated by Maksim Shabunin almost 10 years ago

  • Priority changed from Normal to Low
  • Target version set to 3.1

Updated by Vadim Pisarevsky almost 10 years ago

I think, we are not going to handle older OSX versions anymore, we can not afford it; OSX can be updated for free (or for very modest price) to the latest 10.10 (or 10.9 if you do not like Yosemite look) and fresh Xcode. OpenCV should compile and run fine there.

  • Status changed from Open to Cancelled

Also available in: Atom PDF