Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704A-Liber) Newsgroups: comp.lang.c Subject: Re: Pragmas Message-ID: <3333@ihlpf.ATT.COM> Date: 12 Jan 88 00:54:05 GMT References: <17196@topaz.rutgers.edu> <6920@brl-smoke.ARPA> <14460@think.UUCP> <3313@ihlpf.ATT.COM> <10110@mimsy.UUCP> Reply-To: nevin1@ihlpf.UUCP (00704A-Liber,N.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 35 In article <10110@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <3313@ihlpf.ATT.COM> nevin1@ihlpf.ATT.COM (00704A-Liber) writes: >>... suppose I compile a program that uses 'noalias' with a compiler that >>ignores 'noalias'. I test it and find no problems. I now have a program >>which I believe works but if ported to a compiler which uses 'noalias' >>it might develop a bug. > >Unfortunately, this argument (which I myself used, after a fashion) >fails in general, for there are any number of things you can do to >produce code that, while incorrect, still works on some particular >architecture. Here is an situation where the same architecture is used: While I'm developing code, I don't turn the optimizing option of my compiler on. I test it and find no problems. I then turn the optimizer on. Now I find problems. (And will a debugger such as sdb be able to support 'noalias' so that I can find the bugs in my optimized code?) In order to make sure I have ANSI (so-called :-)) C compatibility, I MUST TEST optimized code (optimized with respect to noalias, that is). >>I believe that all programs which will conform to the ANSI C standard should >>run equivalently under all compilers that conform to ANSI C. (I do not >>believe that ANSI requires a compiler writer to implement the optimizations >>that can be made with the use of noalias.) With noalias, this cannot be >>assured. I still believe this. (BTW, although I am against honoring parens, my argument works FOR adding it to the language.) -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_