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."