From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30427 invoked by alias); 5 Mar 2003 20:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30412 invoked by uid 71); 5 Mar 2003 20:46:01 -0000 Date: Wed, 05 Mar 2003 20:46:00 -0000 Message-ID: <20030305204601.30411.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Andreas Schwab Subject: Re: c/9894: sscanf %d doesn't work with short data type Reply-To: Andreas Schwab X-SW-Source: 2003-03/txt/msg00227.txt.bz2 List-Id: The following reply was made to PR c/9894; it has been noted by GNATS. From: Andreas Schwab To: "Park JongAm" Cc: cgf@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c/9894: sscanf %d doesn't work with short data type Date: Wed, 05 Mar 2003 21:43:10 +0100 "Park JongAm" writes: |> Maybe it's not a "bug" of the gcc. However it doesn't work like other |> compilers, and that can make people confused. It's not a compiler issue. You are invoking undefined behaviour. Don't do that. |> Wouldn't it be better to display error message, "Type not compatible", |> etc? -Wformat -Werror Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."