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: PR preprocessor/33305: Warn for empty macro arguments


Andrew Haley wrote:
> Andrew Haley wrote:
>> Kaveh R. GHAZI wrote:
>>> On Wed, 11 Jun 2008, Andrew Haley wrote:
>>>
>>>> C_COMMON_FIXED_TYPES uses empty macro arguments, which aren't defined in C89.
>>>>
>>>> I can't see any way to fix this that's better than defining a pair of macros.
>>>> Does anyone have any better ideas?
>>>>
>>>> Andrew.
>>>>
>>>>
>>>>
>>>> 2008-06-11  Andrew Haley  <aph@littlepinkcloud.com>
>>>>
>>>> 	* c-common.c (C_COMMON_FIXED_TYPES_SAT): New macro.
>>>> 	(C_COMMON_FIXED_TYPES_SAT): New macro.
>>>> 	(C_COMMON_FIXED_TYPES): Remove first arg.
>>>> 	(C_COMMON_FIXED_MODE_TYPES): Likewise.
>>> I suspect this might partially fix PR bootstrap/33304.  If so, I would
>>> like to see it on the 4.3.x branch also.  Oh and you listed
>>> C_COMMON_FIXED_TYPES_SAT twice in the ChangeLog.
>>>
>>> My hope is that we could warn about empty macro arguments in C90 mode.
>>> Would you like to pursue this as an enhancement?  PR preprocessor/33305.
>>> :-)
> 
> The easiest place to detect this is at expansion time. 

I withdraw this patch; I'm working on a better one.

Andrew.


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