1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 <2009> 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 <2009> 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Warning when initializing a long variable |
From: | "Schoeneburg, Bernd" <[email protected]> |
To: | [email protected] |
Date: | Tue, 21 Apr 2009 22:10:52 +0200 |
Hi all,when I try to initalize a long variable with the most negative value of -2147483648 which should be 0xFFFFFFFF, then I get a compiler warning. The compiler is gcc version 3.4.5 running on solaris.
long test_var = -2147483648L; .... ../devPbdp.c:80: warning: decimal constant is so large that it is unsigned-2147483647 is accepted. This problem exists only with long. char and short can be initialized to the most negative values without any problem.
Any idea? Thank you.... - Bernd