🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1420

Re: Are externs automatically volatile?

#1420
From: Doug Gwyn
Date: Tue, 12 Jun 1990 11:52
12 lines
945 bytes
In article <2213@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes:
>Are all externs volatile?

No, of course not.

>I had hoped, especially with -fstrength-reduce, that this_is_extern
>would be read into a register once, rather than having the  memory
>reference at the bottom of every loop, but that's not what happened.

Most compilers do not perform such global optimization over externs;
since under many circumstances the optimization would be incorrect,
the compiler writer finds it simpler to not worry about it.
Technical Details
Message-ID: <13090@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <2213@atari.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Are externs automatically volatile?
Message-ID: <13090@smoke.BRL.MIL>
Date: 12 Jun 90 11:52:05 GMT
References: <2213@atari.UUCP>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 12