哈哈,今天来公司,公司里面装的软件多。亲测我司正版的 Borland C++ Builder 2007,和免费的社区版的 Microsoft Visual C++ 2010也均是一模一样的结果。然后GCC也是。Visual studio和eclipse的智能感知正确,keil使用的scint的智能感知错误。 IAR试用版过期了没有测试。
C99 标准中的原文摘录: 5.2.1.1 Trigraph sequences
All occurrences in a source file of the following sequences of three characters (called trigraph sequences12)) are replaced with the corresponding single character. ??= #
??( [
??/ \
??) ]
??' ^
??< {
??! |
??> }
??- ~ No other trigraph sequences exist. Each ? that does not begin one of the trigraphs listed
above is not changed.
EXAMPLE The following source line printf("Eh???/n"); becomes (after replacement of the trigraph sequence ??/) printf("Eh?\n");