CBMC
gcc_version.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: gcc version numbering scheme
4 
5 Author: Daniel Kroening
6 
7 Date: May 2018
8 
9 \*******************************************************************/
10 
11 #ifndef CPROVER_GOTO_CC_GCC_VERSION_H
12 #define CPROVER_GOTO_CC_GCC_VERSION_H
13 
14 #include <iosfwd>
15 #include <string>
16 
17 #include <util/config.h>
18 
20 {
21 public:
23 
24  void get(const std::string &executable);
25 
26  bool is_at_least(
27  unsigned v_major,
28  unsigned v_minor = 0,
29  unsigned v_patchlevel = 0) const;
30 
31  enum class flavort
32  {
33  UNKNOWN,
34  CLANG,
35  GCC,
36  BCC
37  } flavor;
38 
41 
43  : v_major(0),
44  v_minor(0),
45  v_patchlevel(0),
47  default_c_standard(configt::ansi_ct::c_standardt::C89),
48  default_cxx_standard(configt::cppt::cpp_standardt::CPP98)
49  {
50  }
51 };
52 
53 void configure_gcc(const gcc_versiont &);
54 
55 std::ostream &operator<<(std::ostream &, const gcc_versiont &);
56 
57 #endif
Globally accessible architectural configuration.
Definition: config.h:132
bool is_at_least(unsigned v_major, unsigned v_minor=0, unsigned v_patchlevel=0) const
void get(const std::string &executable)
Definition: gcc_version.cpp:18
configt::cppt::cpp_standardt default_cxx_standard
Definition: gcc_version.h:40
configt::ansi_ct::c_standardt default_c_standard
Definition: gcc_version.h:39
unsigned v_patchlevel
Definition: gcc_version.h:22
unsigned v_minor
Definition: gcc_version.h:22
unsigned v_major
Definition: gcc_version.h:22
enum gcc_versiont::flavort flavor
void configure_gcc(const gcc_versiont &)
std::ostream & operator<<(std::ostream &, const gcc_versiont &)