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

Compilation errors when using -DNDEBUG flag while compiling #19

Closed
GoogleCodeExporter opened this issue Jan 28, 2016 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Prepare a C++ file that includes glog/logging.h and uses the CHECK()
   macro.
2. Compile the C++ using -DNDEBUG flag.


What is the expected output? What do you see instead?

The file should compile. Instead there are a lot of errors seen
that complain about GetReferenceableValue() not defined. The issue is the
following code in glog/logging.h:

// In optimized mode, use CheckOpString to hint to compiler that
// the while condition is unlikely.
#define CHECK_OP_LOG(name, op, val1, val2, log) \
  while (google::CheckOpString _result = \
         google::Check##name##Impl(GetReferenceableValue(val1), \
                           GetReferenceableValue(val2), \
                           #val1 " " #op " " #val2)) \
    log(__FILE__, __LINE__, _result).stream()
#endif  // STATIC_ANALYSIS, !NDEBUG


The above code needs to replace GetReferenceableValue with
google::GetReferenceableValue .

What version of the product are you using? On what operating system?

Version 0.3.0. Ubuntu 9.10.

Please provide any additional information below.


Original issue reported on code.google.com by mohit.a...@gmail.com on 5 Nov 2009 at 3:38

@GoogleCodeExporter
Copy link
Author

Fixed in

http://code.google.com/p/google-glog/source/detail?r=74

Thanks for the report!

Original comment by shinichi...@gmail.com on 11 Nov 2009 at 9:10

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 37 has been merged into this issue.

Original comment by shinichi...@gmail.com on 15 Feb 2010 at 7:21

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

1 participant