GCC Bugzilla – Attachment 32934 Details for
Bug 61502
== comparison on "one-past" pointer gives wrong result
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
C code as pasted into bug report
pointer_representation_1e.c (text/x-csrc), 447 bytes, created by
Peter Sewell
on 2014-06-13 15:59:09 UTC
(
hide
)
Description:
C code as pasted into bug report
Filename:
MIME Type:
Creator:
Peter Sewell
Created:
2014-06-13 15:59:09 UTC
Size:
447 bytes
patch
obsolete
>#include <stdio.h> >int y = 2, x=1; >int main() >{ > int *p; > p = &x +1 ; > printf("&x=%p &y=%p p=%p\n",(void*)&x, (void*)&y, (void*)p); > _Bool b1 = (p==&y); > printf("(p==&y) = %s\n", b1?"true":"false"); > return 0; >} > > >/* >gcc-4.8 -std=c11 -pedantic -Wall -Wextra -O2 -o a.out pointer_representation_1e.c && ./a.out >&x=0x601020 &y=0x601024 p=0x601024 >(p==&y) = false > >gcc-4.8 --version >gcc-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1 >*/ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 61502
: 32934