C compiler?) Replacement

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

"... ,0x??)" 

with this:

 "... ,0x]" 

We did not find out by trying that the following replacements are performed:

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

So, I assume that this should be a function, not an error.
Visual Studio 2010 does not.

Too bad that you can not perform a search with Google to ??( .
So the question is:

Can we control this behavior with a compiler?

By the way: What is the reason for this?

+6
source share
1 answer

These 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

+11
source

Source: https://habr.com/ru/post/947019/


All Articles