Skip to content

Commit

Permalink
Merge pull request #1973 from karkhaz/kk-c++2a-fixes
Browse files Browse the repository at this point in the history
Fix errors emitted by C++2a compiler
  • Loading branch information
Daniel Kroening authored Mar 26, 2018
2 parents 301cd46 + b052a4d commit 6ca3272
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/cpp/cpp_typecheck_resolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,6 @@ void cpp_typecheck_resolvet::make_constructors(
{
resolve_identifierst new_identifiers;

resolve_identifierst::iterator next;

for(resolve_identifierst::iterator
it=identifiers.begin();
it!=identifiers.end();
Expand Down
1 change: 1 addition & 0 deletions src/goto-instrument/cover_basic_blocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class message_handlert;
class cover_blocks_baset
{
public:
virtual ~cover_blocks_baset() = default;
/// \param t a goto instruction
/// \return the block number of the block
/// the given goto instruction is part of
Expand Down
1 change: 1 addition & 0 deletions src/goto-instrument/cover_instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class goal_filterst;
class cover_instrumenter_baset
{
public:
virtual ~cover_instrumenter_baset() = default;
cover_instrumenter_baset(
const symbol_tablet &_symbol_table,
const goal_filterst &_goal_filters,
Expand Down
4 changes: 4 additions & 0 deletions src/java_bytecode/java_bytecode_parse_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Author: Daniel Kroening, [email protected]
class java_bytecode_parse_treet
{
public:
virtual ~java_bytecode_parse_treet() = default;
class annotationt
{
public:
Expand Down Expand Up @@ -158,11 +159,14 @@ class java_bytecode_parse_treet
is_synchronized(false)
{
}

virtual ~methodt() = default;
};

class fieldt:public membert
{
public:
virtual ~fieldt() = default;
virtual void output(std::ostream &out) const;
bool is_enum;
};
Expand Down
8 changes: 4 additions & 4 deletions src/pointer-analysis/value_set_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ hash_numbering<irep_idt, irep_id_hash> value_set_fit::function_numbering;
static const char *alloc_adapter_prefix="alloc_adaptor::";

#define forall_objects(it, map) \
for(object_map_dt::const_iterator (it) = (map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::const_iterator it = (map).begin(); \
it!=(map).end(); \
(it)++)

#define Forall_objects(it, map) \
for(object_map_dt::iterator (it) = (map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::iterator it = (map).begin(); \
it!=(map).end(); \
(it)++)

void value_set_fit::output(
Expand Down
18 changes: 9 additions & 9 deletions src/pointer-analysis/value_set_fivr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ hash_numbering<irep_idt, irep_id_hash> value_set_fivrt::function_numbering;
static const char *alloc_adapter_prefix="alloc_adaptor::";

#define forall_objects(it, map) \
for(object_map_dt::const_iterator (it)=(map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::const_iterator it=(map).begin(); \
it!=(map).end(); \
(it)++)

#define forall_valid_objects(it, map) \
for(object_map_dt::const_iterator (it)=(map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::const_iterator it=(map).begin(); \
it!=(map).end(); \
(it)++) \
if((map).is_valid_at((it)->first, from_function, from_target_index))
if((map).is_valid_at(it->first, from_function, from_target_index))

#define Forall_objects(it, map) \
for(object_map_dt::iterator (it)=(map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::iterator it=(map).begin(); \
it!=(map).end(); \
(it)++)

#define Forall_valid_objects(it, map) \
for(object_map_dt::iterator (it)=(map).begin(); \
(it)!=(map).end(); \
for(object_map_dt::iterator it=(map).begin(); \
it!=(map).end(); \
(it)++) \
if((map).is_valid_at((it)->first, from_function, from_target_index)) /* NOLINT(*) */

Expand Down

0 comments on commit 6ca3272

Please sign in to comment.