The canonical clc malloc idiom

The canonical clc malloc idiom

Post by Flash Gord » Sat, 22 Sep 2007 05:32:00

Keith Thompson wrote, On 20/09/07 20:12:

In N1124 and N1256 you have in para 5:
If the size is an expression that is not an integer constant
expression: if it occurs in a declaration at function prototype
scope, it is treated as if it were replaced by *; otherwise,
each time it is evaluated it shall have a value greater than zero.
The size of each instance of a variable length array type does not
change during its lifetime. Where a size expression is part of the
operand of a sizeof operator and changing the value of the size
expression would not affect the result of the operator, it is
unspecified whether or not the size expression is evaluated.

which I believe is inconsistent with the paragraph you quoted. So I
think it is a defect in the standard.

Since my comment is about the standard itself I've cross-posted to
Flash Gordon

1. Multi-posting clc++ and clc++m

2. Multi-posting clc++ and clc++m (was: Multiply inherit from classes with conflicting function names)

* Adam, in clc++m:

I already answered this one (the exact same message text), apparently to
Adam's satisfaction, in [clc++].

Could people please /stop/ multi-posting (at least not without noting in
the message that it's multi-posted)?

IMO it's now become a nuisance.

Note: this message has been /cross-posted/ to clc++ and clc++m.

For the difference between cross-posting and multi-posting, see Google.

A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

[ See ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

3. Idioms and Anti-Idioms Question

4. canonical vs non-canonical

5. MALLOCTYPE user: malloc replacement calling default malloc?

6. explicit cast for malloc - malloc & stdlib.h - anytype *t = malloc(N * sizeof(*t)); - False and true assumptions - Clarifications reqd !!

7. Canon CLC 900 E000 error code

8. Excel Link and clc

9. News.Individual.NET does not allows postings in clc [OT]

10. RFC: clc-compliant pseudo-random number generator

11. CBF: The Larry Craig of the CLC clique.

12. OT in CLC: Byte swapping help please [VDC: Voltage Dependent Code]

13. The clc FAQ (Was: dSalvage)

14. CLC Starter/Developer Quirk

15. fiery si + Canon CLC 700