Quoting Ian Lance Taylor <i...@google.com>:
Joern Rennecke <amyl...@spamcop.net> writes:
        * config/sh/sh.c (sh_attribute_table): Use extern in forward
        declaration.
Common issue with declaring/defining const variables in C++.

I've been doing this as

#ifdef __cplusplus
extern
#endif

These #ifdefs sprinkled over the code are awkward.  Could we use a #define
for this?  E.g. put in system.h
#ifdef __cplusplus
#define CONST_VAR_DECL extern const
#else
#define CONST_VAR_DECL const
#endif

Reply via email to