我目前正在解析gcc
类似的错误日志
main.c:5:1: warning: data definition has no type or storage class [enabled by default]
main.c:8:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
main.c in function 'TryAdddition()'
main.c:24:1: warning: data definition has no type or storage class [enabled by default]
main.c:24:10: warning: data definition has no type or storage class [enabled by default]
5,8,24,24 是发生错误或警告的行号。我需要用数字+10 替换这些数字,即: 15,18,34,34
。
然而,并非每一行都是错误或警告行。