This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]