Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 20 Dec 2001 05:34:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 20 Dec 2001 05:34:24 -0500 Received: from p0029.as-l043.contactel.cz ([194.108.242.29]:1284 "EHLO devix") by vger.kernel.org with ESMTP id ; Thu, 20 Dec 2001 05:34:13 -0500 Date: Thu, 20 Dec 2001 11:30:21 +0100 (CET) From: devik X-X-Sender: To: Robert Love cc: Chris Meadors , "linux-kernel@vger.kernel.org" Subject: Re: gcc 3.0.2/kernel details (-O issue) In-Reply-To: <1008792213.806.36.camel@phantasy> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > Well, you certainly won't get errors, because compiler optimizations > shouldn't change expected syntax. not always true, inb() doesn't compile without -O for example. > -O2 is the standard optimization level for the kernel; everything is > compiled via it. When developers test their code, nuances that the > optimization introduce are accepted. Removing the optimization may > break those expectations. Thus the kernel requires it. I'm quite comfortable with the requirement, only I can't imagine code which depends on -O and -O2 difference. Inline assembly is handled by compiler so it should not break things .. Maybe externaly linked assembly code ? But optimization level should not change register usage in calling convention .. Please can you give me example which kind of code breaks those expectations ? Thanks, Martin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/