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

Add spaces to macros in memory.h to make C++11 compilers happy #4839

Merged
merged 1 commit into from
May 27, 2016
Merged

Add spaces to macros in memory.h to make C++11 compilers happy #4839

merged 1 commit into from
May 27, 2016

Conversation

Geequlim
Copy link
Contributor

No description provided.

@bojidar-bg
Copy link
Contributor

@Geequlim Does the new version work in old compilers, and if so, wouldn't it be better to drop the #if?

@Geequlim
Copy link
Contributor Author

Geequlim commented May 27, 2016

@bojidar-bg I just tested with this code

#define __STR "ABC"
#include <iostream>
int main() {
  std::cout << "C++ version:" << __cplusplus << std::endl;
  std::cout << __STR "DEF" << std::endl;
  return 0;
}

The code can be compiled with both GCC 6.1.1 and Clang 3.8.0 with --std=c++98 option

I'm not sure it could work with old version compilers so I didn't drop the old version.

@bojidar-bg
Copy link
Contributor

@Geequlim ~ Well, C++ shouldn't require no spaces for operations I think...

@Geequlim
Copy link
Contributor Author

@bojidar-bg I think so.
Should I remove the #if then?

@akien-mga
Copy link
Member

I think you can remove the #if yeah, we'll have Travis testing the PR on a likely older GCC version anyway. But as @bojidar-bg mentioned, I don't expect compilers to break on it.

@Geequlim
Copy link
Contributor Author

@akien-mga I have removed #if and pushed :)

@akien-mga
Copy link
Member

Could you squash the two commits together? :)

@Geequlim
Copy link
Contributor Author

@akien-mga Squashed.

@akien-mga
Copy link
Member

Thanks :)

@akien-mga akien-mga merged commit eb7227a into godotengine:master May 27, 2016
@Geequlim Geequlim deleted the fix-memory-compiler-warnnings branch May 30, 2016 05:13
@aaronfranke aaronfranke added this to the 2.1 milestone Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants