lkml.org 
[lkml]   [2012]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/10] compiler-gcc.h: Add gcc-recommended GCC_VERSION macro
On Sun, Sep 30, 2012 at 06:11:01PM -0500, Daniel Santos wrote:
> So in light of feedback I've been getting on this patch set, it leaves
> me with
> this question.
> > +#define GCC_VERSION (__GNUC__ * 10000 \
> > + + __GNUC_MINOR__ * 100 \
> > + + __GNUC_PATCHLEVEL__)
> This macro presumes you are using gcc 3.0 or later, which introduced the
> __GNUC_PATCHLEVEL__ predefined macro. Should you be using a version of gcc
> prior to 3.0 (where the macro is undefined), you would get an error that
> __GNUC_PATCHLEVEL__ is undefined prior to getting the error trying to
> include
> "linux/compiler-gcc2.h". So it presumes the compiler is 3.0+, when another
> part of the code may allow it from a future change. Should it be
> modified to
> do account for this or would that be overkill?

Overkill, since Linux requires GCC 3.2 or newer. From compiler-gcc3.h:

#if __GNUC_MINOR__ < 2
# error Sorry, your compiler is too old - please upgrade it.
#endif

- Josh Triplett


\
 
 \ /
  Last update: 2012-10-01 03:01    [W:0.140 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site