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
Old versions of gcc give warnings for pragma diagnostic push and pop #4156
Labels
Projects
Comments
teeks99
added a commit
to teeks99/protobuf
that referenced
this issue
Jan 9, 2018
teeks99
added a commit
to teeks99/protobuf
that referenced
this issue
Jan 9, 2018
teeks99
added a commit
to teeks99/protobuf
that referenced
this issue
Jan 9, 2018
@teeks99 We no longer support old gcc versions on the master branch, but we will keep the 3.5.x branch for pre-C++11 support. |
jschwartzenberg
pushed a commit
to jschwartzenberg/upstream_openjfx-8u
that referenced
this issue
Jun 15, 2019
GCC 4.4 does not support -static-libstdc++, so this is replaced with -Bstatic -lstdc++ -Bdynamic which does the same. Support for pragma diagnostic push and pop also requires a newer GCC, fix based on: protocolbuffers/protobuf#4156
tommie
pushed a commit
to tommie/tmux
that referenced
this issue
Aug 13, 2019
* In format.c, strftime can do format checking if a string literal is given. * In options.c, pr "may be used uninitialized", though that can't happen in practice. The "diagnostic push/pop" pragma was added in GCC 4.6, and according to protocolbuffers/protobuf#4156, there would be warnings if we used them for older GCCs.
tommie
pushed a commit
to tommie/tmux
that referenced
this issue
Aug 13, 2019
* In cmd-new-session.c, dsx and dxy "may be used uninitialized", and it was difficult to tell if that can happen in practice. * In format.c, strftime can do format checking if a string literal is given. * In options.c, pr "may be used uninitialized", though that can't happen in practice. The "diagnostic push/pop" pragma was added in GCC 4.6, and according to protocolbuffers/protobuf#4156, there would be warnings if we used them for older GCCs.
GCC versions older than 6.3 are not supported. See https://opensource.google/documentation/policies/cplusplus-support#2_compilers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#pragma GCC diagnostic push
and#pragma GCC diagnostic pop
are only supported in gcc >= 4.6.A solution to this would be to change the guards from
and
To:
and
There are approximately a dozen header files that do this, as well as the cpp_file.cc codegen. This could be applied to the 3.?.x branches, but might not be needed on master....if master is now c++11, gcc versions before 4.6 might not work with it anyway...I guess it depends on how good various gcc's -std=c++0x support was back then. Might not hurt to apply to master as well.
The text was updated successfully, but these errors were encountered: