From: Vladimir T. <vtz...@gm...> - 2017-05-31 05:18:57
|
On Wed, May 31, 2017 at 1:52 AM, Bruno Haible <br...@cl...> wrote: > In this conditional expression: > ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 5)) > the conditional for GCC looks odd: it > - includes versions 4.5, 4.6, 4.7, 4.8, 4.9 > - but excludes versions 5.4, 6.3, 7.1 > which is probably not what you meant since GCC 5.4 is a successor of 4.9. > > The usual way to write conditions like this is > (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)) > or - not my preferred coding style - > (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4) > Oops, my bad! Fixed. > Note that this doesn't help with clang on Mac OS X, since it defines > __GNUC__ = 4 and __GNUC_MINOR__ = 2. Yes, that's the reason I added explicit check for __clang__. |