From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8963 invoked by alias); 16 Jul 2003 14:02:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8956 invoked by uid 48); 16 Jul 2003 14:02:42 -0000 Date: Wed, 16 Jul 2003 14:02:00 -0000 Message-ID: <20030716140242.8954.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030716081310.11540.philippe.haution@mines-paris.org> References: <20030716081310.11540.philippe.haution@mines-paris.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11540] Redefinition of default arguments allowed for template functions X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg01828.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11540 bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID ------- Additional Comments From bangerth at dealii dot org 2003-07-16 14:02 ------- The code is legal: first, there is only one definition (but two declarations), so the one-definition rule is inapplicable. Besides a violation of the ODR does not require a diagonstic. On the other hand, 8.6.3/4 specifically allows your case, saying that default arguments defined in different scopes have completely independent values. W.