This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, committed] PPC405 atomic support (PR target/21760)


>>>>> Andreas Schwab writes:

>> + /* If configured for PPC405, support PPC405CR Erratum77.  */
>> + #define PPC405_CPU_DEFAULT ("405")
>> + #if #TARGET_CPU_DEFAULT == #PPC405_CPU_DEFAULT

Andreas> What is this expression supposed to do?  It doesn't match
anything defined by C89.

	The expression is comparing the stringified value of the macros.
When --with-cpu is not used, TARGET_CPU_DEFAULT is defined as

#define TARGET_CPU_DEFAULT ((char *)0)

and CPP produces an error comparing something with that value.

("405") is the value to which TARGET_CPU_DEFAULT is defined in tm.h when
--with-cpu=405 is used.

David


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