Skip to content

Commit

Permalink
Explicitly #include cstdint.h for GCC 15 (#111)
Browse files Browse the repository at this point in the history
GCC 15 has streamlined some headers, with the result that cstdint.h is
no longer implicitly included in some places where it used to be. The
ethos build fails with error messages such as this:
```
In file included from /builddir/build/BUILD/ethos-0.1.1-build/ethos-ethos-0.1.1/src/lexer.cpp:9:
/builddir/build/BUILD/ethos-0.1.1-build/ethos-ethos-0.1.1/src/lexer.h:28:3: error: ‘uint32_t’ does not name a type
   28 |   uint32_t d_line;
      |   ^~~~~~~~
/builddir/build/BUILD/ethos-0.1.1-build/ethos-ethos-0.1.1/src/lexer.h:21:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
```
  • Loading branch information
jamesjer authored Feb 1, 2025
1 parent 7cdb9e4 commit 77e6aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef EXPR_H
#define EXPR_H

#include <cstdint>
#include <map>
#include <unordered_set>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LEXER_H

#include <array>
#include <cstdint>
#include <fstream>
#include <iosfwd>
#include <string>
Expand Down

0 comments on commit 77e6aec

Please sign in to comment.