Path: 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 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.