2020年3月3日 星期二

莫名其妙的問題

以下程式使用 MinGW 8.1.0 64位元版(x86_64-posix-seh) 編譯

採用 Release 和 Debug 兩種模式編譯的執行結果不一樣(另人傻眼)

本來想說是不是編譯器的 bug,但有以下的訊息:
the compiler can assume that the address of 'p' will never be NULL [-Waddress]

更另人傻眼了