m***@gmail.com
2015-02-07 15:32:51 UTC
I am 'amazed' by the gcc compiler (picked up via apt-get install ...)
It seems it is only giving 32-bit pointers.
Let's assume I have done something wrong - please tell me what.
"ptr.c" [New File] 9 lines, 181 characters written
***@x066:/data/smoker/perl-blead# gcc -o ptr ptr.c
***@x066:/data/smoker/perl-blead# ./ptr
size of Char Pointer is: 4 bytes
***@x066:/data/smoker# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
***@x066:/data/smoker# gcc --version
gcc (Debian 4.6.3-14) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
p.s. Also tested on ubuntu
***@x067:/home/michael# gcc -o ptr ptr.c
***@x067:/home/michael# ./ptr
Size Char Ptr:4
Size Void Ptr:4
***@x067:/home/michael# gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It seems it is only giving 32-bit pointers.
Let's assume I have done something wrong - please tell me what.
"ptr.c" [New File] 9 lines, 181 characters written
***@x066:/data/smoker/perl-blead# gcc -o ptr ptr.c
***@x066:/data/smoker/perl-blead# ./ptr
size of Char Pointer is: 4 bytes
***@x066:/data/smoker# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
***@x066:/data/smoker# gcc --version
gcc (Debian 4.6.3-14) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
p.s. Also tested on ubuntu
***@x067:/home/michael# gcc -o ptr ptr.c
***@x067:/home/michael# ./ptr
Size Char Ptr:4
Size Void Ptr:4
***@x067:/home/michael# gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.