Skip to content
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

Code should compile with --std=c++03 before we switch to c++11 only. #3492

Closed
liujisi opened this issue Aug 15, 2017 · 1 comment
Closed
Assignees

Comments

@liujisi
Copy link
Contributor

liujisi commented Aug 15, 2017

I tried to compile a c++03 protoc on mac, but it seems to be broken: following is an incomplete list of the failures. We should test the c++03 compatibility before making the C++11 only switch.

  1. va_copy undefined - used in src/google/protobuf/stubs/stringprintf.cc
    va_copy is only defined after C++11, however clang implicitly defines it when --std is not explicitly set. If --std=c++03 is passed, the function is not found. (need to use __va_copy)

  2. isinf undefined - used in src/google/protobuf/stubs/mathlimits.h
    there's a hack to workaround the including issue for gcc4.9 bug (see comments in the mathlimits.h). But plain isinf is not defined for clang for non C++11.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Aug 15, 2017

I don't think our code base ever compiles with --std=c++03. The va_copy code has been there since always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants