使用C89和C99编译时,C程序在运行时的行为有何不同?

Joh*_*zem 14 c c99 c89 language-lawyer

我发现以下代码片段(我认为在维基百科中)会在识别C++注释时创建不同的运行时:

int a = 4 //* This is a comment, but where does it end? */ 2
  ;
Run Code Online (Sandbox Code Playgroud)

但直到现在,这是唯一一个(不包括变体).

我对区分使用__STDC__等不感兴趣,而不是C89无法编译的程序.

是否有其他程序/片段与C99产生不同的C89运行时间?

caf*_*caf 6

该程序将0.000000在符合C89的实现和1.000000符合C99的实现上打印:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    double d = strtod("0x1", NULL);
    printf("%f\n", d);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)