[PATCH][GOLD] Fix build breakage on OSX due to unintended macro substitution.
Ian Lance Taylor
iant@google.com
Mon Jan 11 06:50:00 GMT 2010
"Doug Kwan (關振德)" <dougkwan@google.com> writes:
> +// This is defined to avoid unintended macro substitutions in DEFINE_var below.
> +// On Mac OSX, assert.h is included transitively by some other library headers
> +// we use. We need to use EMPTY_PARAMETER_LIST to avoid assert() being
> +// substituted as a macro when the "assert" command line option is defined.
> +// Note that this only deals with function-like macros.
> +
> +#define EMPTY_PARAMETER_LIST ()
>
> // These are helper macros use by DEFINE_uint64/etc below.
> // This macro is used inside the General_options_ class, so defines
> @@ -249,7 +256,7 @@ struct Struct_special : public Struct_va
> optional_arg__, type__, param_type__, parse_fn__) \
> public: \
> param_type__ \
> - varname__() const \
> + varname__ EMPTY_PARAMETER_LIST const \
Does it work to write
(varname__)() const
? If it does, please do that instead, with a short comment. Thanks.
Ian
More information about the Binutils
mailing list