This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [patch] Fix uninitialized Dwarf_Frame->regs
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 08 Oct 2012 14:33:10 -0700
- Subject: Re: [patch] Fix uninitialized Dwarf_Frame->regs
> static_assert is C++0x keyword (GDB has gdb_static_assert); but system.h is
> not exported so I found it OK.
I think it's potentially confusing to define a macro that is the same
identifier as a keyword. This also might cause some trouble with the
C++-heavy code on the dwarf branch. So let's use a different name.
> +#define static_assert(expr) \
> + extern int __attribute__ ((unused)) \
> + never_defined_just_used_for_checking[(expr) ? 1 : -1]
The usual style is to put the attribute at the end of the decl.
Thanks,
Roland