Why one form have no warning the other forms have warning when using -Wformat=2

2024-04-19 Thread Qun-Ying via Gcc
defined it as "const char *fmt_str" or "const char *const fmt_str", warning is given. Most of the time, I would prefer fmt_str to be "const char *" or "const char *const" to ensure it is not mutable. From my view, the compiler should either give no warning (

GCC document link broken and some document questions

2014-12-19 Thread Qun-Ying
of content at the end of the file. It defects its purpose. Thanks -- Qun-Ying

Should gcc give warning for this case?

2012-04-29 Thread Qun-Ying
; } I compile with gcc 4.7.0 with: gcc -Wall -pedantic -std=c99 forward.c No warning at all. Should gcc warn about the *next pointer points to an unknown structure? I know it is allow by the standard, but most of the case, it indicates some error in the code. -- Qun-Ying