-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathgcc_version.h
57 lines (41 loc) · 1.1 KB
/
gcc_version.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*******************************************************************\
Module: gcc version numbering scheme
Author: Daniel Kroening
Date: May 2018
\*******************************************************************/
#ifndef CPROVER_GOTO_CC_GCC_VERSION_H
#define CPROVER_GOTO_CC_GCC_VERSION_H
#include <iosfwd>
#include <string>
#include <util/config.h>
class gcc_versiont
{
public:
unsigned v_major, v_minor, v_patchlevel;
void get(const std::string &executable);
bool is_at_least(
unsigned v_major,
unsigned v_minor = 0,
unsigned v_patchlevel = 0) const;
enum class flavort
{
UNKNOWN,
CLANG,
GCC,
BCC
} flavor;
configt::ansi_ct::c_standardt default_c_standard;
configt::cppt::cpp_standardt default_cxx_standard;
gcc_versiont()
: v_major(0),
v_minor(0),
v_patchlevel(0),
flavor(flavort::UNKNOWN),
default_c_standard(configt::ansi_ct::c_standardt::C89),
default_cxx_standard(configt::cppt::cpp_standardt::CPP98)
{
}
};
void configure_gcc(const gcc_versiont &);
std::ostream &operator<<(std::ostream &, const gcc_versiont &);
#endif