This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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][GOLD] Fix build breakage on OSX due to unintended macro substitution.


"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


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