From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25032 invoked by alias); 27 Jan 2006 14:20:46 -0000 Received: (qmail 25020 invoked by uid 48); 27 Jan 2006 14:20:45 -0000 Date: Fri, 27 Jan 2006 14:20:00 -0000 Message-ID: <20060127142045.25019.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/25992] conditional expression and strings literal In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "anton dot kirillov at rd-software dot com" 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 X-SW-Source: 2006-01/txt/msg02979.txt.bz2 List-Id: ------- Comment #4 from anton dot kirillov at rd-software dot com 2006-01-27 14:20 ------- (In reply to comment #3) > I have not looked into the standard yet but if GCC's warning message is correct > this is valid but deprecated code which allows for a compiler to accept it or > not. > deprecated this converiont: void foo( char* ) { } int main() { foo( "lalala" ); } i.e. convresion from strings literal to char*, but the result of expression (0 ? "a" : "b") IS NOT STRING LITERAL!!! IT'S CONST CHAR[2]!!! ( See 5.16 ) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25992