line size on C sources files

Martin v. Loewis
Tue Mar 28 15:14:00 GMT 2000

> Is there anywhere on earth a rule/specification/usage that say that a C
> source file must not have any line that exceeds 255 characters ?

There is no such rule, but there is a different rule saying that all
implementations of C can have arbitrary limits, as long as they are
documented as such. However, for a number of limits, minimum
acceptable implementation limits are given, in particular, as per (of C99)

- 4095 characters in a logical source line

So if you have more characters than that in a line, an implementation
of standard C could reject it and still claim conformance to the C
standard. Of course, no implementation of C is *required* to reject
it, in fact, implementations are encouraged to avoid imposing fixed
translation limits whenever possible.

Please note that this number is from C99; it may have been lower in


More information about the Gcc-help mailing list