Re: [PATCH] Fix build with GCC 4.7 (and probably other C++11 compilers).

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 21 Jun 2012 21:51:52 -0600

On 06/20/2012 07:12 PM, Amos Jeffries wrote:
> On 20.06.2012 22:37, Dmitry Kurochkin wrote:
>> Hi all.
>>
>> C++11 introduced user-defined literals, it breaks some code which
>> was valid before. In particular, whitespace is now needed after
>> a string literal and before something that could be a valid
>> user-defined literal. See "User-defined literals and whitespace"
>> section at [1] for more details.
>>
>> There are many such cases in Squid, e.g.:
>>
>> outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);
>>
>> Which results in errors when building with GCC 4.7:
>>
>> error: unable to find string literal operator 'operator"" PRIu64'
>>
>> The patch adds spaces between string literals and macros.
>>
>> Regards,
>> Dmitry
>>
>> [1] http://gcc.gnu.org/gcc-4.7/porting_to.html
>
>
> +1. Beat me to it. I just got this same change building and was about to
> submit in a few days :-)

Committed to trunk as r12184. Thanks guys!

Alex.
Received on Fri Jun 22 2012 - 03:52:13 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 22 2012 - 12:00:08 MDT