Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C compiler ??) replacement

We faced a strange issue with the Visual Studio 2005 compiler.
At compile time, it replaces this string constant

"... ,0x??)"

with this one:

"... ,0x]"

We hardly learned by trying that the following replacements are performed:

??(   ->   [
??)   ->   ]
??<   ->   {
??>   ->   }

So I guess this should be a feature, not a bug.
The Visual Studio 2010 doesn't do that.

Too bad you can't search with Google for ??(.
So the question is:

Can we control this behavior by a compiler switch?

BTW: What is the reason for this?

like image 800
joe Avatar asked Jun 11 '13 10:06

joe


1 Answers

Those are C digraphs and trigraphs: http://en.wikipedia.org/wiki/Digraphs_and_trigraphs

And yes, you can disable them in visual studio: http://msdn.microsoft.com/en-us/library/ee462497.aspx

like image 109
Guillaume Avatar answered Sep 28 '22 07:09

Guillaume