source: branches/stable/TEMPLATES/gccver.h

Last change on this file was 16628, checked in by westram, 6 years ago
  • reintegrates 'vectorize' into 'trunk'
    • fixes #700
      • documented vectorization-checks
      • fine-grained check based on gcc-version
    • drops old gcc-versions (<4.4.3)
    • new attribute __ATTR__DONT_VECTORIZE
      • disabled vectorization of POS_TREE2::init_static() for newer gcc-versions (generated code fails tests)
    • added a bunch of new vectorization-checks (probably irrelevant to overall performance)
  • adds: log:branches/vectorize@15531:16585,16595:16627
File size: 1.3 KB
Line 
1// ================================================================ //
2//                                                                  //
3//   File      : gccver.h                                           //
4//   Purpose   : central place for gcc-version-dependent defs       //
5//                                                                  //
6//   Coded by Ralf Westram (coder@reallysoft.de) in December 2012   //
7//   Institute of Microbiology (Technical University Munich)        //
8//   http://www.arb-home.de/                                        //
9//                                                                  //
10// ================================================================ //
11
12#ifndef GCCVER_H
13#define GCCVER_H
14
15#ifndef __GNUC__
16# error You have to use the gnu compiler!
17#endif
18
19#define GCC_VERSION_CODE    ((__GNUC__ * 100) + __GNUC_MINOR__)
20#define GCC_PATCHLEVEL_CODE ((GCC_VERSION_CODE * 100) + __GNUC_PATCHLEVEL__)
21
22// check required gcc version:
23#if (GCC_PATCHLEVEL_CODE >= 40403) // gcc 4.4.3 or newer
24# define GCC_VERSION_OK
25#else
26# if (GCC_VERSION_CODE >= 402) // gcc 4.2 is ok for clang
27#  ifdef __clang__
28#   define GCC_VERSION_OK
29#  endif
30# endif
31#endif
32
33#ifndef GCC_VERSION_OK
34# error Wrong compiler version (need at least gcc 4.4.3 or clang 4.2)
35#endif
36
37#else
38#error gccver.h included twice
39#endif // GCCVER_H
Note: See TracBrowser for help on using the repository browser.