-
Notifications
You must be signed in to change notification settings - Fork 243
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
Please include cstdint for gcc13 #245
base: master
Are you sure you want to change the base?
Conversation
Thanks for the fix. My only issue with this PR is that I am not a fan of prefixing simple basic types with |
@toge : can you check if changing g++/gcc13 to version 14 in the GH workflow already works? I think Ubuntu 24.04 ships GCC 14 or at least has install options for it. |
src/util/sqlhelper.cpp
Outdated
@@ -15,7 +16,7 @@ std::ostream& operator<<(std::ostream& os, const DatetimeField& datetime); | |||
std::ostream& operator<<(std::ostream& os, const FrameBound& frame_bound); | |||
|
|||
std::string indent(uintmax_t num_indent) { return std::string(num_indent, '\t'); } | |||
void inprint(int64_t val, uintmax_t num_indent) { std::cout << indent(num_indent).c_str() << val << " " << std::endl; } | |||
void inprint(std::int64_t val, uintmax_t num_indent) { std::cout << indent(num_indent).c_str() << val << " " << std::endl; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example why I don't like the prefix. We would also need to add it to many other things (here uintmax_t) to make it consistent, right?
@Bouncner |
@Bouncner This modification will allow compiling with gcc13 without using Could you review it again?
I checked sql-parser works fine on gcc14 without this PR on Fedora Linux 40. |
@@ -1,6 +1,7 @@ | |||
#include "Expr.h" | |||
#include <stdio.h> | |||
#include <string.h> | |||
#include <stdint.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pick here: Please have a look at the include order. Running the format.sh
script should already fix this.
I also started a workflow run. Not sure what happened to the gcc-6 stage though. However, we already have a gcc-13 runner there since #242.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might have a problem with Ubuntu 18. But where does node come from? It's from the GitHub action checkout? Curious how that can fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several compilation errors with gcc 13.
You need to include cstdint and add the std:: prefix as described in the error message.
This fix is within the scope of the C++ standard and should not affect other compilers.