Path: csiph.com!news.mixmin.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sat, 12 Nov 2016 13:04:59 -0600 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Compiler design in C? References: <87shr14n5b.fsf@gmail.com> <87r36k1l4w.fsf@gmail.com> <3e47c9bc-1c0a-40dc-9dc3-92e88ace6c31@googlegroups.com> <23d0f58e-a17c-4ef7-8db6-9cc5b7bcaf04@googlegroups.com> <9e27a17d-aaab-48e1-9139-95114dea0da6@googlegroups.com> <3121b7be-aca1-44b0-9dc9-6b23611bbfba@googlegroups.com> <300e8fda-56cf-476f-9bd7-257791357090@googlegroups.com> Date: Sat, 12 Nov 2016 19:04:59 +0000 Message-ID: <8760nsr02s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:BSAJRqtOPT2/1/DgkUEO32LbJkE= MIME-Version: 1.0 Content-Type: text/plain Lines: 21 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-FIi40qJHCnhKPPTfy9Q71e/v+TfpHCSxRuhSbzKhL9wQFozAAMvZc7zftCvs1sCJDTXGzcuwpBk3Esz!U+SgAvHb78ohdFTMSH7i7faEygpXxewG0RWozpqSpQZm16IEoLzpEKtJy1a+JQUvO7ZB X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2772 Xref: csiph.com comp.lang.c:96418 supercat writes: > The Standards allow compilers to do many things. I would suggest, however, > that people making quality compilers should endeavor to see how they are > being used, and provide a means of producing break-proof builds (e.g. have > a command-line option that would prevent a compiler from enabling any new > optimizations that might break old code, except when such options are > expressly enabled). There's a compatibility mode in gcc-6 that makes it work like gcc-4.6 Simply install gcc-4.6 alongside gcc-6 and invoke it as gcc-4.6 > Do you see any disadvantage to a compiler doing those things? If they're possible. But optimizers don't really work like that. For example, two different peephole optimizers will produce different code based on the order they're invoked. Would changing the order of invocation qualify as a "new optimization"? If so, you're insisting that the internal structure of the compiler must, essentially, freeze, and that's not going to happen.