How to get gcc to skip errors, but still output them.

后端 未结 3 2023
长情又很酷
长情又很酷 2021-01-18 12:31

is it possible to force gcc to report errors, but keep compiling past them? Essentially I\'m trying to generate a list of errors in a .c file, but gcc always terminates at t

3条回答
  •  囚心锁ツ
    2021-01-18 12:54

    From gcc online doc:

    -fmax-errors=n

    Limits the maximum number of error messages to n, at which point GCC bails out rather than attempting to continue processing the source code. If n is 0 (the default), there is no limit on the number of error messages produced. If -Wfatal-errors is also specified, then -Wfatal-errors takes precedence over this option.

提交回复
热议问题