Re: Error with gcc 4.7.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/1/2012 12:41 PM, Pranith Kumar wrote:
Hi,

I am getting the following error when using gcc 4.7.1 to compile:

snprintf(temp, sizeof(temp)/sizeof(temp[0]), "%"PRIi64, value);

Your error has to do (as far as I can see) with the new user defined literals in c++11. To the compiler, "%"PRIi64 looks like a user-defined literal. I'm assuming that PRIi64 is a #define to some literal string.


error: unable to find string literal operator ‘operator"" PRIi64’

This compiles fine with Intel compiler. Is this a bug? Is there any
workaround?


If you add a space between the two, you should be fine.

--
rbmj


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux