This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/9580] printing negative values of constant values (withvalue 128-255)
- From: "john.t.kerich at nasa dot gov" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 10 Aug 2011 15:53:40 +0000
- Subject: [Bug c++/9580] printing negative values of constant values (withvalue 128-255)
- Auto-submitted: auto-generated
- References: <bug-9580-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=9580
John T. Kerich <john.t.kerich at nasa dot gov> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |john.t.kerich at nasa dot
| |gov
--- Comment #2 from John T. Kerich <john.t.kerich at nasa dot gov> 2011-08-10 15:53:40 UTC ---
#include <stdio.h>
static const int z = 128;
static int y = 128;
int main( int argc, char * argv [] )
{
int ret = 0;
printf( "%d\n", z );
return( ret );
}
g++ -c -I. -g -Wall testNeg.C -o testNeg.o
testNeg.C:4: warning: 'y' defined but not used
g++ -MM -I. -g -Wall testNeg.C > .deps/testNeg.d
g++ -o testNeg testNeg.o
(gdb) run
Starting program: /home/jkerich/CC_tools/testNeg
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x2aaaaaaab000
128
Breakpoint 1, main (argc=1, argv=0x7fffffffe1b8) at testNeg.C:12
12 return( ret );
(gdb) print z
$1 = -128
(gdb) print y
$2 = -128
(gdb) quit
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.