Issue 44 in open-vcdiff: VCD_COMPILE_ASSERT warns with -Wunused-local-typedef

14 views
Skip to first unread message

open-...@googlecode.com

unread,
Sep 23, 2014, 10:28:40 AM9/23/14
to open-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 44 by tha...@chromium.org: VCD_COMPILE_ASSERT warns with
-Wunused-local-typedef
https://code.google.com/p/open-vcdiff/issues/detail?id=44

Both gcc and clang warn on unused typedefs in recent versions.
VCD_COMPILE_ASSERT triggers this. Please apply this patch to fix this for
projects using c++11 (like e.g. chromium):

diff --git a/src/compile_assert.h b/src/compile_assert.h
index 3f4344f..86a1269 100644
--- a/src/compile_assert.h
+++ b/src/compile_assert.h
@@ -46,9 +46,13 @@ struct CompileAssert {

} // namespace open_vcdiff

+#if __cplusplus >= 201103L
+#define VCD_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+#else
#define VCD_COMPILE_ASSERT(expr, msg) \
typedef open_vcdiff::CompileAssert<static_cast<bool>(expr)> \
msg[static_cast<bool>(expr) ? 1 : -1]
+#endif

// Implementation details of VCD_COMPILE_ASSERT:
//


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

open-...@googlecode.com

unread,
Sep 23, 2014, 10:29:41 AM9/23/14
to open-...@googlegroups.com
Issue 44: VCD_COMPILE_ASSERT warns with -Wunused-local-typedef
https://code.google.com/p/open-vcdiff/issues/detail?id=44

This issue is now blocking issue chromium:411648.
See https://code.google.com/p/chromium/issues/detail?id=411648

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

open-...@googlecode.com

unread,
Jul 17, 2015, 6:41:45 AM7/17/15
to open-...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 44 by fdeg...@chromium.org: VCD_COMPILE_ASSERT warns
with -Wunused-local-typedef
https://code.google.com/p/open-vcdiff/issues/detail?id=44

Moved to https://github.com/google/open-vcdiff/issues/44 and fixed. I'm
going to roll it into chromium.
I just noticed the filing date today. I'm sorry this took so long, I don't
think anyone had alerts set up for this repository anymore.

open-...@googlecode.com

unread,
Jul 17, 2015, 1:09:42 PM7/17/15
to open-...@googlegroups.com

Comment #3 on issue 44 by tha...@chromium.org: VCD_COMPILE_ASSERT warns
with -Wunused-local-typedef
https://code.google.com/p/open-vcdiff/issues/detail?id=44

Thanks!
Reply all
Reply to author
Forward
0 new messages