This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: line size on C sources files
> 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
5.2.4.1 (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
C89.
Regards,
Martin