Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#3427) Remove noreturn attribute
Home

[Freeciv-Dev] Re: (PR#3427) Remove noreturn attribute

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3427) Remove noreturn attribute
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Feb 2003 11:13:05 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Raimar Falke wrote:
> 
> Non-gcc compiler will complain about the missing return statements and
> so on.

I'm strongly against this change.

The purpose of getting compiler warnings is to catch bugs.  Only a small 
portion of compiler warnings are actually because of bugs, but it is 
nonetheless an efficient way to find them.  Warnings generated by the 
noreturn attribute are much better than the 'average' warning in terms 
of finding bad pieces of code.  I don't think it is a good trade-off to 
give up this checking in return for removing a few compiler warnings on 
a compiler that few (if any) of the developers use.

Further, it is not necessary for everyone to see all the compiler 
warnings.  If someone compiles on intel cc and writes a code that 
generates a warning under gcc, any of the gcc-using developers can see 
and correct this.  Unless intel cc can provide a better error-catching 
warning set than the one we'd have to give up to use it, I don't think 
the switch is worth it.

However, I would hope that other compilers would have something 
corresponding to the noreturn attribute.  This would have to be defined 
on a per-compiler bases, but could be useful if any developer actually 
does use a given compiler.

jason




[Prev in Thread] Current Thread [Next in Thread]