?

Log in

No account? Create an account
"unsigned short long int" - Adventures in Engineering — LiveJournal
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2006-09-21 22:28
  Subject:   "unsigned short long int"
Public
  Mood:programmer humor
  Music:MC Plus+ - Code Rage

/* $Id: stddef.h,v 1.2 2004/08/04 18:52:23 GrosbaJ Exp $ */
#ifndef __STDDEF_H
#define __STDDEF_H

[...]

typedef unsigned short int size_t;
typedef unsigned short int sizeram_t;
typedef unsigned short long int sizerom_t;


-From mcc18's stddef.h




Subject: "typedef int int" legal?
From: Stephen Sprunk

That "long long" even exists is a travesty.

What are we going to do when 128-bit ints become common in another couple
decades? Call them "long long long"? Or if we redefine "long long" to be
128-bit ints and "long" to be 64-bit ints, will a 32-bit int be a "short
long" or a "long short"? Maybe 32-bit ints will become "short" and 16-bit
ints will be a "long char" or "short short"? Or is a "short short" already
equal to a "char"?

All we need are "int float" and "double int" and the entire C type system
will be perfect! </sarcasm>


Subject: "typedef int int" legal?
From: jacob navia

lcc-win32 supports 128 bit integers. The type is named: int128

Planned is support for 128 bit constants with:

i128 m = 85566677766545455544455543344i128;

and

printf("%i128d",m);


Subject: "typedef int int" legal?
From: Jack Klein (?)

The 256 bit integer type has already been designated "long long long long spam and long".

'nuff said.



- http://www.thescripts.com/forum/threadnav472449-4-10.html
Post A Comment | 2 Comments | | Link






Trevor Stone: dogcow moof!
  User: flwyd
  Date: 2006-09-23 18:11 (UTC)
  Subject:   (no subject)
Keyword:dogcow moof!
Maybe we need long at 128, int at 32, short at 16, and medium at 64.
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2006-09-23 23:10 (UTC)
  Subject:   (no subject)
Tell you what, if you write a letter to the C language committee proposing "medium" as the new identifier for 64 bit ints, I'll sign right on. ;]

Personally, I think maybe we should just make the bit length an explicit part of the type name. "n16" for a 16 bit number, "n32" for a 32 bit number, etc.
Reply | Parent | Thread | Link



browse
May 2015