malloc vs. realloc

I

Irrwahn Grausewitz

Ekkehard Morgenstern said:
Irrwahn Grausewitz said:
[copy of Dan Pop's post snipped]
What I said to him also applies to you. No C/C++ package linker has the
limits you talked about. So there's no "undefined behaviour".

Get real. Undefined behaviour is behaviour that's not defined by the
standard. Get a copy and read it. It's worth both the money and the
time to read it. If you want to discuss properties of a particular
implementation you may do so, but please not here in clc. Thank you.

Regards
 
I

Irrwahn Grausewitz

Ekkehard Morgenstern said:
"Dan Pop" <[email protected]> schrieb im Newsbeitrag
[Hint: even Backdoor Express allows you to modify the
attribution line.]
Well, definitely more than you. I've been programming in C since 1986.
Perhaps you've been playing with lego's then, if you were born at all.

LOL. I imagine his colleagues would've been slightly irritated,
if this were true.

So whatever archaic C compiler you're using, it's none of our times.

Uh, you are one of those "all the world is a {W|L}intel-box"
guys. Every implementation in use nowadays is 'of our times'
per definition.
When I began programming in C, identifiers were significant only to 6
characters. I'm glad that such limits don't exist anymore. You're talking
about pink elephants, I know of no linker that can handle only 31 characters
of significance.

Guess what: that doesn't mean that no such beast exists.

Regards
 
A

Al Bowers

Ekkehard said:
[copy of Dan Pop's post snipped]


What I said to him also applies to you. No C/C++ package linker has the
limits you talked about. So there's no "undefined behaviour".

It is the Standard that defines the language, not implementations.
And in the Standard
Section 6.4.2.1

6 Any identifiers that differ in a significant character are
different identifiers. If two identifiers differ only in
nonsignificant characters, the behavior is undefined.
 
D

Dan Pop

Well, definitely more than you.

I'll let the rest of c.l.c to be the judge of this one.
I've been programming in C since 1986.
Perhaps you've been playing with lego's then, if you were born at all.

But it's equally probable (from the information you possess) that I've
been programming in C since 1976 or even earlier. Furthermore, there are
people who get more experience in two years of programming in C than
others in a lifetime.

Despite your inability to compare either the quantity or the quality of
our experiences, you've posted the above. This puts you in the same
league with Mark McIntyre, our resident idiot.

Dan
 
B

Barry Schwarz

On 1 Dec 2003 12:24:58 GMT, (e-mail address removed) (Dan Pop) wrote:

snip
Despite your inability to compare either the quantity or the quality of
our experiences, you've posted the above. This puts you in the same
league with Mark McIntyre, our resident idiot.
You have enough fun insulting Mark when you respond to his posts. Do
you also need to do it gratuitously?


<<Remove the del for email>>
 
M

Mark McIntyre

On 1 Dec 2003 12:24:58 GMT, (e-mail address removed) (Dan Pop) wrote:

snip
You have enough fun insulting Mark when you respond to his posts. Do
you also need to do it gratuitously?

Don't bother on my behalf. Dan has the social skills of a blast ended
screwt, and holds a grudge like only the Swiss can, but thats ok, I
know hes a twit so I can ignore him merrily. .
 
K

Kelsey Bjarnason

[snips]

When I began programming in C, identifiers were significant only to 6
characters. I'm glad that such limits don't exist anymore.

No? Okay, good. Point out where in the C standard you're guaranteed to have, say, 128 significant characters in identifiers.
 
B

Ben Pfaff

Kelsey Bjarnason said:
No? Okay, good. Point out where in the C standard you're
guaranteed to have, say, 128 significant characters in
identifiers.

The new limit is 31 characters according to 5.2.4.1#1. That's
much more reasonable than 6. If you need more, just take the
SHA-1 hash of your longer identifier, convert the first 15 bytes
of the result to hexadecimal, prepend a letter to ensure it
doesn't begin with a digit, and you're done. Easy. 120 bits of
uniqueness should be enough identifiers for anyone, but if you
still need more then you can use base-63 encoding and fit the
whole 160 bits of SHA-1 in there. (If you don't want to remember
hash values, write a preprocessor.)
 
K

Kelsey Bjarnason

[snips]

The new limit is 31 characters according to 5.2.4.1#1.

Yeah, but someone seems to be going on about 256 characters and God knows
what all else. 6 was pretty cheesy, 31 seems adequate.
 
D

Dan Pop

In said:
[snips]

The new limit is 31 characters according to 5.2.4.1#1.

Yeah, but someone seems to be going on about 256 characters and God knows
what all else. 6 was pretty cheesy, 31 seems adequate.

6, for external identifiers only, was imposed by some platforms that were
still relevant by 1989. They've been put to sleep in the meantime, so C99
could extend it to 31, which is far too much for human generated
identifiers, but probably OK for machine generated identifiers.

Dan
 
L

Lew Pitcher

Dan said:
[snips]

The new limit is 31 characters according to 5.2.4.1#1.

Yeah, but someone seems to be going on about 256 characters and God knows
what all else. 6 was pretty cheesy, 31 seems adequate.


6, for external identifiers only, was imposed by some platforms that were
still relevant by 1989. They've been put to sleep in the meantime,

Nah. Not "put to sleep", just "refurbished and renovated". MVS now supports
externals/entrypoints beyond 8 characters long, and no longer requires UPPER
CASE only entrypoints.
so C99
could extend it to 31, which is far too much for human generated
identifiers, but probably OK for machine generated identifiers.

--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
 
D

Dan Pop

In said:
Dan said:
[snips]

On Wed, 03 Dec 2003 22:30:17 -0800, Ben Pfaff wrote:


The new limit is 31 characters according to 5.2.4.1#1.

Yeah, but someone seems to be going on about 256 characters and God knows
what all else. 6 was pretty cheesy, 31 seems adequate.


6, for external identifiers only, was imposed by some platforms that were
still relevant by 1989. They've been put to sleep in the meantime,

Nah. Not "put to sleep", just "refurbished and renovated". MVS now supports
externals/entrypoints beyond 8 characters long, and no longer requires UPPER
^^^^^^^^^^^^
CASE only entrypoints.

The 6 monocase character limit was not imposed by IBM OSs, but by
DEC OSs for the PDP-11. DEC stopped supporting them, as well as the
underlying hardware, quite some time before being bought by Compaq.

These OSs used 32 bits for external symbols in the object file format.
Each 16-bit word could represent 3 characters of the RADIX-50 character
set (a character set with 050 members).

Dan
 
G

glen herrmannsfeldt

Dan Pop wrote:

(snip)
The 6 monocase character limit was not imposed by IBM OSs, but by
DEC OSs for the PDP-11. DEC stopped supporting them, as well as the
underlying hardware, quite some time before being bought by Compaq.

These OSs used 32 bits for external symbols in the object file format.
Each 16-bit word could represent 3 characters of the RADIX-50 character
set (a character set with 050 members).

I am pretty sure that RT-11 is still in use.

I never had a C compiler to run on it, though.

-- glen
 
D

Dan Pop

In said:
Dan Pop wrote:

(snip)


I am pretty sure that RT-11 is still in use.

In use for running legacy applications (lab and industry automation),
not for active software development.
I never had a C compiler to run on it, though.

DECUS C supported RT-11, but I'm not aware of any standard C compiler
for the PDP-11 hardware. I wouldn't be surprised if someone ported gcc
to the PDP-11, at least as a cross-compiler, though.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,109
Messages
2,570,671
Members
47,263
Latest member
SyreetaGru

Latest Threads

Top