🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.alpha
Article #14

Re: Having hassle with C linking

#14
From: Pat Rankin
Date: Sun, 13 Dec 1992 05:50
19 lines
1573 bytes
In article <Bz5M1C.Kns@dscomsa.desy.de>, Hallam@zeus02.desy.de writes...
> There is a difference in the behaviour of the C compiler, The VAX compiler
> was lax about insisting that extern variables be declared at some point
> (ie without the extern part).

     There is a CC qualifier available for controlling the model used for
extern objects.  You can get behavior identical to VAX C's by using it.

> Bit of a silly C feature I think, a declaration should be a declaration.

     A declaration is not a definition, and the old sloppy code was what
was silly (for C; it matched the FORTRAN common block behavior).  The
method used as the default by DEC C is sanctioned by the C standard.  If
you argue that /standard=vaxc ought to imply /extern_model=common_block
for better VAX C compatibility then I might agree with you, but the
current default is more appropriate for ANSI mode.  There is also a
#pragma directive for controlling this on a case-by-case basis.

		Pat Rankin, rankin@eql.caltech.edu
Technical Details
Message-ID: <12DEC199222504264@eql.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!eql.caltech.edu!rankin
References: <Bz2DA5.6DE@dscomsa.desy.de> <Bz3ttr.G8A@constellation.ecn.uoknor.edu> <Bz5M1C.Kns@dscomsa.desy.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!eql.caltech.edu!rankin
From: rankin@eql.caltech.edu (Pat Rankin)
Newsgroups: vmsnet.alpha
Subject: Re: Having hassle with C linking
Date: 12 Dec 1992 22:50 PDT
Organization: California Institute of Technology
Lines: 19
Distribution: world
Message-ID: <12DEC199222504264@eql.caltech.edu>
References: <Bz2DA5.6DE@dscomsa.desy.de> <Bz3ttr.G8A@constellation.ecn.uoknor.edu> <Bz5M1C.Kns@dscomsa.desy.de>
NNTP-Posting-Host: eql.caltech.edu
News-Software: VAX/VMS VNEWS 1.41