🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42469

Re: NORETURN value

#42469
From: Al Reynolds
Date: Tue, 05 Dec 1995 00:00
65 lines
3144 bytes
> Date: Tue, 5 Dec 95 14:06:12 GMT
> Organization: University of Rochester - Rochester, New York
> From: pinc_cif@uhura.cc.rochester.edu (Joshua Pincus)
> Sender: help-gcc-request@prep.ai.mit.edu
> 
> Sunday, 12-3
> 
> I am enquiring about gcc 2.7.x.  I have installed 2.7.0 and 2.7.2 in the
> last few weeks in order to keep the system updated.  (Personally, I have
> been awaiting the day that templates will work right!)  My problem with
> all the post 2.6.3 compilers is that none of them will compile the gnu C
> library, v.1.09. 
> 
> It was my understanding that this library is VERY important, and I would
> prefer to have a nice new C library kicking around for all of the new
> software that needs it.  The __NORETURN symbol is my only problem so far. 
> None of the 2.7.x compilers will understand the symbol.  I get parse errors
> whenever it shows up in a header file that I need to include in a program.
> 
> Furthermore, this symbol shows up all the time in glibc.  I had to use 2.6.3
> to compile glibc in order to make it work.  I am a novice to these kinds of
> administrative issues, but I am not naive enough to think that glibc can't
> be compiled by 2.7.2.
> 
> PLEASE, I would like to know if other people have had this problem and how
> they (preferably) corrected it.
> 
> Thanks,
> Josh Pincus
> pinc_cif@uhura.cc.rochester.edu

I just finished compiling glibc-1.09 with gcc-2.7.2.  Yes, the
__NORETURN and __CONSTVALUE attributes are a nuisance and I had to
edit the source files to get the entire library to compile on a
sparc-sun-sunos4.1.4.  Apparently the attributes have to be after the
parameter list, not before it and only defined in the prototypes, not
the definitions.

The __NORETURN definition in misc/sys/cdefs.h has to be changed from
"__attribute__ ((__volatile__))" to "__attribute ((__noreturn__))".
Then each prototype that references __NORETURN and __CONSTVALUE has to
be modified to move the attribute after the parameter list.  As an
example:

extern __NORETURN void f __P((void));
extern __CONSTVALUE int f __P((int arg));

should be:

extern void f __P((void)) __NORETURN;
extern int f __P((int arg)) __CONSTVALUE;

Then, in the files that define these functions the __NORETURN and
__CONSTVALUE attributes have to be deleted.

That's all I had to do.  You will get additional warning messages for
some of the __NORETURN functions that actually have non-void return
types and return statements (particularly in the assert stuff) in them
but comments to those functions indicate that that this intentional
and not an oversight.

Have fun,
Al Reynolds

Somewhere on Earth.
Technical Details
Message-ID: <9512051616.AA14910@gfarch.zycad.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <1995Dec5.140612.16330@galileo.cc.rochester.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b3f13e88b237f8c9,start
X-Google-Attributes: gid11318c,public
From: alan2@zycad.com (Al Reynolds)
Subject: Re: NORETURN value
Date: 1995/12/05
Message-ID: <9512051616.AA14910@gfarch.zycad.com>
X-Deja-AN: 120945685
distribution: gnu
sender: daemon@cis.ohio-state.edu
references: <1995Dec5.140612.16330@galileo.cc.rochester.edu>
organization: GNUs Not Usenet
newsgroups: gnu.gcc.help