Skip to content

Stop using C headers #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CODING_STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ Here a few minimalistic coding rules for the CPROVER source tree.
include in the source file. For example, given `foo.h` and `foo.cpp`, the
line `#include "foo.h"` should precede all other include statements in
`foo.cpp`.
- Use the C++ versions of C headers (e.g. `cmath` instead of `math.h`).
Some of the C headers use macros instead of functions which can have
unexpected consequences.

# Makefiles
- Each source file should appear on a separate line
Expand Down
4 changes: 1 addition & 3 deletions src/util/ieee_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Author: Daniel Kroening, [email protected]

#include "ieee_float.h"

// <cstdint> is yet to come
#include <stdint.h>

#include <cstdint>
#include <ostream>
#include <cassert>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion src/util/pipe_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Module: A stdin/stdout pipe as STL stream
#else
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
#include <cstring>
#include <csignal>
#endif

#define READ_BUFFER_SIZE 1024
Expand Down