CBMC
cpp_parser.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Parser
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #include "cpp_parser.h"
13 
14 #include <util/config.h>
15 
16 #include <ansi-c/gcc_version.h>
17 
19 
21 {
22  if(!support_float16.has_value())
23  {
25  {
26  gcc_versiont gcc_version;
27  gcc_version.get("gcc");
29  gcc_version.is_at_least(13u);
30  }
31  else
32  support_float16 = false;
33  }
34 
35  // We use the ANSI-C scanner
42  false; // these are still typedefs
48 
49  return cpp_parse(*this, log.get_message_handler());
50 }
configt config
Definition: config.cpp:25
bool ts_18661_3_Floatn_types
Definition: ansi_c_parser.h:69
struct configt::cppt cpp
struct configt::ansi_ct ansi_c
cpp_token_buffert token_buffer
Definition: cpp_parser.h:49
std::optional< bool > support_float16
Definition: cpp_parser.h:67
virtual bool parse() override
Definition: cpp_parser.cpp:20
ansi_c_parsert::modet mode
Definition: cpp_parser.h:43
ansi_c_parsert ansi_c_parser
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
enum gcc_versiont::flavort flavor
message_handlert & get_message_handler()
Definition: message.h:184
std::istream * in
Definition: parser.h:27
void set_file(const irep_idt &file)
Definition: parser.h:89
messaget log
Definition: parser.h:140
irep_idt get_file() const
Definition: parser.h:96
bool cpp_parse(cpp_parsert &, message_handlert &)
Definition: parse.cpp:8398
C++ Parser.
preprocessort preprocessor
Definition: config.h:263
enum configt::cppt::cpp_standardt cpp_standard