I was working in some running legacy C code compiled with C99 compiler and I encountered a '#' (hash symbol) on an otherwise empty line in the middle of a header file. I compile with -Wall, -Werrors, and -pedantic but get no complaint from the GCC compiler that runs my unit tests, or my target cross compiler. I did a quick google search of the BNF syntax of both the language and the pre-processor an could not figure out what should happen for a stray #. It happened to be in column 1 but if I move it to column 2 it still does not throw any warnings. My GCC compiler is gcc (Rev1, Built by MSYS2 project) 9.1.0.
Not a problem really, just unexpected.
Anyone have any insights?