[cfe-dev] [libc++abi] [PATCH] silencing -Wundef warnings

Florian Kutscherauer florian.kutscherauer at gmx.at
Mon Oct 28 11:03:58 PDT 2013


Good Evening to you all,


I tried to compile libc++abi with -Weverything enabled and got a whole
bunch of warnings.

I changed some #if X's to #if defined(X)'s to silence all of the -Wundef
warnings.

None of the functionality has changed, so it should be safe to apply the
the attached patch without breaking anything.  *fingers crossed*

Also, there are some unused (member-)functions in cxa_demangle.cpp,
cxa_guard.cpp, and stdexcept.cpp.  Are those intentionally kept, or are
they "leftovers" and could be removed?

I hope this is useful to someone.  I will keep working on some of the
other warnings (a whole bunch of them are caused by casting pointers
with different alignment-requirements) and refactoring the code a bit.
Unless someone wants me to "keep my filthy hands off" their code, that
is.  ;-)


Best regards, Flo.


---
  include/cxxabi.h         |  2 +-
  include/unwind.h         | 10 +++++-----
  src/abort_message.cpp    |  6 +++---
  src/cxa_exception.cpp    |  6 +++---
  src/cxa_exception.hpp    |  8 ++++----
  src/cxa_guard.cpp        |  3 ++-
  src/cxa_personality.cpp  | 14 +++++++-------
  src/private_typeinfo.cpp |  8 ++++----
  src/stdexcept.cpp        | 12 ++++++------
  9 files changed, 35 insertions(+), 34 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-Wundef.patch
Type: text/x-patch
Size: 4858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131028/d4c16fa3/attachment.bin>


More information about the cfe-dev mailing list