开发者

Disable specific errors

开发者 https://www.devze.com 2023-04-03 13:49 出处:网络
Is it possible to turn off all macro and pasting errors (or errors of any types)? ie: error: macro \"macro_name\" passed 1 arguments, but takes just 0

Is it possible to turn off all macro and pasting errors (or errors of any types)? ie:

error: macro "macro_name" passed 1 arguments, but takes just 0
error: pasting "&" and "0" does not give a valid preprocessing to开发者_Go百科ken

The reason is that I'm debugging code that has a bunch of these errors (which I haven't fixed yet) that are making it harder to see the other types of errors that I'm trying to fix first.


No, that's why they're errors instead of warnings; the compiler doesn't know what to do with/how to work around them. You should usually fix errors in the order they come up anyway, especially the preprocessor errors you want to turn off, because an error in one part of the code can propagate and cause "errors" in other, correct, parts of the code. If you're getting too many errors, use make 2>&1 | less to get them without scrolling back.


Pipe the output of the compiler to a text file, and then read the text file to find your errors. You could remove the "un-interesting" errors via RegEx or something similar.

0

精彩评论

暂无评论...
验证码 换一张
取 消