Should preprocessor instructions be on the beginning of a line?

前端 未结 5 1701
长发绾君心
长发绾君心 2020-12-16 12:52

A while ago I have discovered an (rather ancient) C Compiler, which scanned macros this way (Pseudo code):

 if line.startswith(\"#include\") or line.startswi         


        
5条回答
  •  长情又很酷
    2020-12-16 13:28

    Doesn't matter. See it this way, if code was not idented and in 1 line it still should compile(only code, preprocessor/includes at some other things needs a seperate line).

    Edit: seems to be that really old compiler are picky about this. Preprocessor should be at one line, just like other non-code things like includes

提交回复
热议问题