Skip to content

CBMC C++ frontend doesn't detect implicit -std option #2359

Closed
@smowton

Description

@smowton

With g++-7 at least, -std=c++14 is implied if the user doesn't make an explicit choice. However, cbmc's frontend expects c++03 unless something is explicitly specified. It should either check the __cplusplus defined by the compiler to find out what it understood to be the prevailing standard and act accordingly, or force -std=c++03. The former is better, as a configure script would be reasonable to avoid using -std if the compiler appears to be modern enough that it supports the desired language version without an explicit switch.

This causes all cpp regression tests that use decltype and similar to fail when the real compiler is g++7.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions