From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15852 invoked by alias); 26 Jul 2010 15:59:44 -0000 Received: (qmail 15753 invoked by uid 48); 26 Jul 2010 15:59:30 -0000 Date: Mon, 26 Jul 2010 15:59:00 -0000 Message-ID: <20100726155930.15752.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/45082] Static const signed int class member causes undefined symbol. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rwitmer at xmission dot com" 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: 2010-07/txt/msg02879.txt.bz2 ------- Comment #2 from rwitmer at xmission dot com 2010-07-26 15:59 ------- I agree with your assessment. Adding const int myclass::BUFF_SIZE; resolves the issue. The bug/feature may be that re-typing BUFF_SIZE to static const unsigned int allows the compiler to not report a problem. It doesn't require a const unsigned myclass::BUFF_SIZE; anywhere and still compiles when it shouldn't. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45082