[Python-Dev] Windows build broken in exceptions.c

Tim Peters tim_one@email.msn.com
Fri, 14 Jul 2000 02:15:27 -0400

>> exceptions.c(93) : error C2026: string too big, trailing characters
>> truncated

[Fredrik Lundh
 Sent: Wednesday, July 12, 2000 4:19 AM]
> but back to the original topic: what does the ANSI standard
> say about this?

A conforming C compiler isn't required to accept string literals longer than
509 characters (and that's *after* concatenating adjacent strings).  An
excellent summary (although not a rationale) can be found here:


Read it carefully, and my bet is you'll realize you've never seen a portable
C program!  For example, ever #include a file whose basename was longer than
6 characters or used mixed case?  Then you're in the unsupported fast lane

> what is, for example, the limits for integer arrays?

There are (small!) limits both on physical source lines and on the size of
initialized objects.  See the above and *you* try to figure it out <wink>.

> (my unicode database experiments results in a couple of big
> ones.  and for best performance, they really have to be that
> big...)

The std guarantees only the feeblest of compile-time abilities, so you're
(the generic "you", i.e. "us") very unlikely to write this stuff in a way
the std guarantees will work.  But it's not worth worrying about (within
reason), until we hit an actual compiler that complains.  The only way to be
completely sure is to stick to tiny compile-time entities and paste them
together at runtime.

and-even-then-it's-not-really-sure-ly y'rs  - tim