From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18455 invoked by alias); 26 Jul 2010 16:37:52 -0000 Received: (qmail 18379 invoked by uid 48); 26 Jul 2010 16:37:28 -0000 Date: Mon, 26 Jul 2010 16:37:00 -0000 Message-ID: <20100726163728.18378.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: "redi at gcc dot gnu dot org" 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/msg02888.txt.bz2 ------- Comment #4 from redi at gcc dot gnu dot org 2010-07-26 16:37 ------- (In reply to comment #3) > > If you only want it to be used as an integral constant, don't use it in a > context that requires a variable (e.g. reference binding) e.g. funky((int)myclass::BUFF_SIZE); This means the reference binds to a temporary, not to your class variable, and therefore the compiler only needs the value of BUFF_SIZE, not it's definition. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45082