From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25635 invoked by alias); 22 Apr 2012 16:51:54 -0000 Received: (qmail 25622 invoked by uid 22791); 22 Apr 2012 16:51:52 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Apr 2012 16:51:39 +0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53072] New: automatically set Init() only if option was not set in some other way Date: Sun, 22 Apr 2012 16:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg01842.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53072 Bug #: 53072 Summary: automatically set Init() only if option was not set in some other way Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: manu@gcc.gnu.org Currently, it is possible to specify an initial value in the .opt file with Init(). However, this value is set at the beginning, so it is (impossible?) to know whether the value is the default or was set explicitly in some other way. This is why many options are initialized to -1 instead. The infrastructure to detect whether options have been set explicitly seems to be there, but it is not clear how to use it to fix the above problem.