Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #69234
| From | jayjwa <jayjwa@atr2.ath.cx.invalid> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: VMS |
| Date | 2025-06-30 22:18 -0400 |
| Organization | Atr2 RG 2025 |
| Message-ID | <87bjq4y7pz.fsf@atr2.ath.cx> (permalink) |
| References | (16 earlier) <cs6dnYG6Hbc5Wvz1nZ2dnZfqn_idnZ2d@giganews.com> <103teq1$220b9$1@dont-email.me> <wwvv7odu0p2.fsf@LkoBDZeT.terraraq.uk> <103tg4t$220b9$3@dont-email.me> <103ti51$22ifd$7@dont-email.me> |
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> Remember, Unix systems were fully 32-bit right from the 1980s onwards, and
> embraced 64-bit early on with the DEC Alpha in 1992. So “long” would have
> been 64 bits from at least that time, because why waste an occurrence of
> the “long” qualifier?
$ purge
$ cc /version
Compaq C V6.4-005 on OpenVMS VAX V7.3
$ cc sizeof.c
$ link sizeof
$ run sizeof
Size of int is 4 bytes, 32 bits.
Size of float is 4 bytes, 32 bits.
Size of double is 8 bytes, 64 bits.
Size of char is 1 byte, 8 bits.
Size of long int is 4 bytes, 32 bits.
$ type sizeof.c
/* A program to show the size of various type in bytes and bits. */
#include <stdio.h>
#include <stdlib.h>
int main( void ) {
printf( "Size of int is %d bytes, %d bits.\n", sizeof( int ), sizeof( int ) * 8 );
printf( "Size of float is %d bytes, %d bits.\n", sizeof( float ), sizeof( float ) * 8 );
printf( "Size of double is %d bytes, %d bits.\n", sizeof( double ), sizeof( double ) * 8 );
printf( "Size of char is %d byte, %d bits.\n", sizeof( char ), sizeof( char ) * 8 );
printf( "Size of long int is %d bytes, %d bits.\n", sizeof( long int ), sizeof( long int ) * 8 );
return EXIT_SUCCESS;
}
$
gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/15.1.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/15.1.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-threads=posix --enable-checking=release --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-plugin --enable-lto --disable-install-libiberty --disable-werror --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64 --disable-gtktest --enable-clocale=gnu --with-arch=x86-64 --enable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.1.0 (GCC)
gcc -o sizeof sizeof.c
./sizeof
Size of int is 4 bytes, 32 bits.
Size of float is 4 bytes, 32 bits.
Size of double is 8 bytes, 64 bits.
Size of char is 1 byte, 8 bits.
Size of long int is 8 bytes, 64 bits.
https://www.reddit.com/r/C_Programming/comments/15jtsv8/does_anyone_knows_a_compiler_where_sizeoflong/
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
VMS c186282 <c186282@nnada.net> - 2025-06-14 01:15 -0400
Re: VMS Bobbie Sellers <bliss-sf4ever@dslextreme.com> - 2025-06-14 10:05 -0700
Re: VMS Andreas Eder <a_eder_muc@web.de> - 2025-06-14 20:30 +0200
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-14 23:27 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-15 00:57 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-14 23:32 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-15 08:26 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-15 21:12 -0400
Re: VMS Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-06-16 18:15 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-17 23:20 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-18 04:14 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-18 02:34 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-15 18:49 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-15 22:45 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-16 04:35 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-16 01:35 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-14 23:03 -0400
Re: VMS candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-18 05:30 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-18 02:09 -0400
Re: VMS candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-18 19:00 +0000
Re: VMS Rich <rich@example.invalid> - 2025-06-18 20:23 +0000
Re: VMS Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-06-18 20:30 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-18 23:09 +0000
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-19 08:40 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-20 00:43 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-20 09:00 +0100
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-20 10:19 +0100
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-20 15:15 +0100
Re: VMS Rich <rich@example.invalid> - 2025-06-20 13:36 +0000
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-20 16:15 +0100
Re: VMS Rich <rich@example.invalid> - 2025-06-20 23:07 +0000
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-21 01:07 +0100
Re: VMS rbowman <bowman@montana.com> - 2025-06-21 03:09 +0000
Re: VMS Robert Riches <spamtrap42@jacob21819.net> - 2025-06-21 03:43 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 01:36 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-21 05:53 +0000
Re: VMS candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-22 13:50 +0000
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-22 15:27 +0100
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-22 15:56 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-23 00:18 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-22 19:23 +0000
Re: VMS candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-23 18:10 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-23 19:27 +0000
Re: VMS Robert Riches <spamtrap42@jacob21819.net> - 2025-06-24 03:34 +0000
Re: VMS Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-06-24 04:52 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-24 05:14 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-24 01:36 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-24 06:49 +0000
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-24 10:31 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-25 01:36 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-25 07:31 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-25 03:08 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-24 08:56 +0100
Re: VMS Robert Riches <spamtrap42@jacob21819.net> - 2025-06-25 03:01 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-25 01:59 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-25 06:52 +0000
Re: VMS John Ames <commodorejohn@gmail.com> - 2025-06-25 09:32 -0700
Re: VMS John Ames <commodorejohn@gmail.com> - 2025-06-25 09:44 -0700
Re: VMS c186282 <c186282@nnada.net> - 2025-06-25 19:01 -0400
Re: VMS candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-27 06:00 +0000
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-27 08:37 +0100
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-27 08:45 +0100
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-27 08:14 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-27 13:27 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-27 19:13 +0100
Re: VMS Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-06-28 09:16 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-27 13:24 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-27 17:40 +0000
Re: VMS Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2025-06-27 18:20 +0000
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-27 23:03 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-28 01:13 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-28 06:10 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-27 18:16 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-28 08:52 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-28 23:16 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-29 08:18 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-29 19:09 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-30 08:36 +0100
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-30 08:51 +0100
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-30 08:59 +0100
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-30 08:33 +0000
Re: VMS John Ames <commodorejohn@gmail.com> - 2025-06-30 09:08 -0700
Re: VMS jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-06-30 22:18 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-30 09:00 +0100
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-30 09:24 +0100
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-30 08:34 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-30 23:30 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-30 23:26 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-07-01 10:49 +0100
Re: VMS Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2025-07-01 12:44 +0000
Re: VMS Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-07-02 01:13 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-07-01 21:46 -0400
Re: VMS Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2025-07-02 16:03 +0000
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-30 07:54 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-30 18:10 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-30 23:12 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-07-01 04:02 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-07-01 12:42 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-30 08:56 +0100
Re: VMS Rich <rich@example.invalid> - 2025-06-27 19:40 +0000
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-20 21:19 +0100
Re: VMS Rich <rich@example.invalid> - 2025-06-20 23:17 +0000
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-21 08:42 +0100
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-21 07:02 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 03:23 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 01:27 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 01:10 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-21 05:59 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 02:10 -0400
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-20 10:12 +0100
Re: VMS Rich <rich@example.invalid> - 2025-06-20 13:39 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 01:23 -0400
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-21 06:57 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 03:07 -0400
Re: VMS Richard Kettlewell <invalid@invalid.invalid> - 2025-06-21 08:45 +0100
Re: VMS c186282 <c186282@nnada.net> - 2025-06-22 02:32 -0400
Re: VMS Rich <rich@example.invalid> - 2025-06-20 13:30 +0000
Re: VMS The Natural Philosopher <tnp@invalid.invalid> - 2025-06-20 16:14 +0100
Re: VMS Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-20 08:57 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-21 01:17 -0400
Re: VMS c186282 <c186282@nnada.net> - 2025-06-14 22:57 -0400
Re: VMS Rich <rich@example.invalid> - 2025-06-15 14:24 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-15 22:26 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-16 04:30 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-16 01:31 -0400
Re: VMS Rich <rich@example.invalid> - 2025-06-18 17:40 +0000
Re: VMS rbowman <bowman@montana.com> - 2025-06-18 23:06 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-18 19:43 -0400
Re: VMS Rich <rich@example.invalid> - 2025-06-19 01:08 +0000
Re: VMS c186282 <c186282@nnada.net> - 2025-06-19 00:46 -0400
Re: VMS rbowman <bowman@montana.com> - 2025-06-19 06:36 +0000
csiph-web