Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!apollo!vinoski From: vinoski@apollo.HP.COM (Stephen Vinoski) Newsgroups: comp.lang.perl Subject: VOLATILE in cmd.c Message-ID: <51b2fae2.20b6d@apollo.HP.COM> Date: 21 May 91 18:11 GMT Sender: root@apollo.HP.COM Organization: Hewlett-Packard Apollo Division - Chelmsford, MA Lines: 23 Several weeks ago someone was complaining that the Apollo Domain/C compiler gave bogus warnings about the function arguments specified as "volatile" in the file cmd.c, and wanted to know what they could do about it. It might be better to ask why those function arguments are specified as "volatile" in the first place. What exactly does it mean to specify function arguments as volatile? How can a stack location or a register be volatile, assuming the computer is operating correctly and the compiler generates proper code? The only reason I could come up with for making the arguments volatile would be to prevent some brain-damaged compiler from incorrectly optimizing references to them away. Can someone enlighten me? I personally think our compiler is right for barking about this strange usage of the "volatile" specifier. thanks, -steve | Steve Vinoski (508)256-0176 x5904 | Internet: vinoski@apollo.hp.com | | HP Apollo Division, Chelmsford, MA 01824 | UUCP: ...!apollo!vinoski |