This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/fortran] Add option to make 1st error fatal


On Sun, 2005-10-30 at 20:26 -0800, Steve Kargl wrote:
> On Sun, Oct 30, 2005 at 11:17:30PM -0500, Andrew Pinski wrote:
> > > 
> > > On Sun, Oct 30, 2005 at 10:55:00PM -0500, Andrew Pinski wrote:
> > > > > Here's a new patch based on feedback from Andrew Pinski on IRC.
> > > > > Bubblestrap and regression tested on i386-*-freebsd.
> > > > 
> > > > -Werror does not do what option does.  It just changes warnings
> > > > to be considered an error for the return value.
> > > 
> > > According to 'tkinfo gcc', 
> > > 
> > > `-Werror'
> > >      Make all warnings into hard errors.  Source code which triggers
> > >      warnings will be rejected.
> > > 
> > > This is exactly what my patch does.  A warning becomes a fatal
> > > error.
> > 
> > No, it turns them into normal errors and not fatal errors.
> 
> I have not idea what you mean.  If I use "gfortran -Werror"
> with my patch, gfortran will exit when it hits the first 
> warning.  That appears to be fairly fatal.
> 

That just means your error recovery sucks :)

Normally, things just put error_mark_node in the appropriate place and
move on until something checks error count.

For example, if i try to say, compile a shell script with gcc:

dberlin@linux:~/> gcc -x c -Werror /usr/bin/svndiff
/usr/bin/svndiff:1:2: error: invalid preprocessing directive #!
/usr/bin/svndiff:2: error: syntax error before '/' token
/usr/bin/svndiff:5: error: syntax error before '{' token

dberlin@linux:~/>gcc -x c -Werror -Wfatal-errors /usr/bin/svndiff
/usr/bin/svndiff:1:2: error: invalid preprocessing directive #!
/usr/bin/svndiff:2: error: syntax error before '/' token
compilation terminated due to -Wfatal-errors.






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]