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, generic] Support printing of escaped curly braces and vertical bar in assembler output


Yep, sure. I missed that (*p != NULL) check.

Thanks, Michael

On 29 March 2013 05:15, Segher Boessenkool <segher@kernel.crashing.org> wrote:
>> I'd suggest rewriting this expression in some easier way:
>>               p += (*p == '%' && *(p + 1)) ? 2 : 1;
>>
>> I'd prefer
>>               if (*p == '%')
>>                 p++;
>>               p++;
>
>
> That's not the same thing though.  Maksim's code is correct,
> although it could certainly be written more clearly.
>
> Maybe something like
>
>
>   if (*p == '%')
>     p++;
>   if (*p)
>     p++;
>
>
> Segher
>



-- 
---
Best regards,
Michael V. Zolotukhin,
Software Engineer
Intel Corporation.


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