2015年5月19日 星期二

C/C++ 小知識(一)

參考資料:PTT C_AND_CPP 精華區

implementation-defined :
The consequence of some certain syntax is desided by compiler, not standard of C/C++. The compiler is obligated to tell you how to define it.
某些語法的執行結果並沒有在C/C++標準中定義,而是由編譯器決定。
但編譯器有義務告知這些定義。

unspecified :
standard C/C++ doesn't define the rule (or give a robust definition), but the compiler will decide it without obligation to inform you.
由編譯器決定如何處理某些語法以達到符合C/C++標準的結果,但無義務告知。

undefined behavior :
Some syntax which the compilers can do what ever they want with them because standard C/C++ doesn't define it.
指C/C++標準未定義其表現的敘述,可編譯但編譯器想怎樣就怎樣。
編譯器不會指出這些語法有問題,但這會是潛在的炸彈。

沒有留言:

張貼留言

Google Code Prettify