Make Gcc Stop On First Error
Contents |
how to make gcc stop when there is a warning From: lopezibanez at gmail dot com To: "Richard Guenther"
Gcc Stop After First Error
also -Wfatal-errors). On 12/05/06, Richard Guenther
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring makefile exit on error developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Makefile Ignore Error And Continue
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them;
Gcc Werror
it only takes a minute: Sign up gcc compiler not stop on first error up vote 5 down vote favorite 1 How does one get gcc to not stop compiling after the first error. Is there a compiler flag https://gcc.gnu.org/ml/gcc/2006-05/msg00275.html that will do this? Basically I'm wanting to remove a class, but i'm not sure how much of an impact that will have, so i'm wanting to determine how many classes would have provblems if i, say, remove the class from the makefile. Is there a better way to determine this impact? gcc compiler-construction compiler-errors compiler-flags share|improve this question asked Nov 21 '12 at 16:08 shadonar 3621625 add a comment| 2 Answers 2 active oldest votes up vote 15 http://stackoverflow.com/questions/13497307/gcc-compiler-not-stop-on-first-error down vote accepted There's a GCC compiler option -Wfatal-errors to stop after the first error: -Wfatal-errors This option causes the compiler to abort compilation on the first error occurred rather than trying to keep going and printing further error messages You can also use -Werror if you want to treat warnings as errors so that you'll catch any warning that might be generated when you remove your class. share|improve this answer answered Nov 21 '12 at 16:29 P.P. 58.4k768119 add a comment| up vote 1 down vote Is there a better way to determine this impact? Use the refactoring support, built-in in many IDEs. For example, with NetBeans, you can choose to rename a class and preview all affected places. Without an IDE, you can rename the class/method/field, instead of deleting it and gradually, with several compilation runs, change all usages of the old name, where the compiler gives an error. Then grep for the new name. share|improve this answer answered Nov 21 '12 at 16:46 chill 12k11834 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged gcc compiler-const
after the stop on first error? For example if i get 50 errors about undefined reference how would i get it to stop after the first library it stop on first couldnt find? Thanks Jan 18, 2011 at 2:42am UTC wolfgang (381) -Wfatal-errors in command line call, or add it to the options in your IDE call. Jan 18, 2011 at 2:54am UTC newbie43 (11) thanks Topic archived. No new replies allowed. C++ Information Tutorials Reference Articles Forum Forum BeginnersWindows ProgrammingUNIX/Linux ProgrammingGeneral C++ ProgrammingLoungeJobs Home page | Privacy policy© cplusplus.com, 2000-2016 - All rights reserved - v3.1Spotted an error? contact us
"here I am" post here to differ human beings from SPAM bots. Home Help Search Login Register Wiki Code::Blocks » User forums » General (but related to Code::Blocks) » Stop on first error « previous next » Send this topic Print Pages: [1] Go Down Author Topic: Stop on first error (Read 4277 times) JMK Multiple posting newcomer Posts: 13 Stop on first error « on: August 25, 2010, 01:28:13 am » I am using the default GCC compiler Codeblocks selects when installed. I think I have MinGW 5.1.6 installed. When I enable the "Stop compiling after the first error" option in the build settings, I get this message from the compiler:cc1.exe: error: unrecognized command line option "-Wfatal-errors"This is such a basic setting that I think should be the default mode. I don't understand why anyone would want any other behavior, at least by defaultDo I need to install another version of MinGW? Which versions will support this option?Thank you. This issue is the primary reason I am looking for an alternative to Visual Studio. « Last Edit: August 25, 2010, 01:30:48 am by JMK » Logged oBFusCATed Developer Lives here! Posts: 9498 Re: Stop on first error « Reply #1 on: August 25, 2010, 02:13:51 am » Please do not cross post (talking about the post in the other thread)!For compiler options look in the compiler's documentation!QuoteI don't understand why anyone would want any other behavior, at least by defaultBecause people are different and some of us want to fix multiple errors in on go... Logged