Bug 19290 - cpp truncates long lines with no warning
cpp truncates long lines with no warning
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: cpp (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-17 19:10 EDT by henry
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-13 06:17:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description henry 2000-10-17 19:10:21 EDT
The cpp shipped with Red Hat 7.0, at least on Intel hardware, silently
truncates long (and I mean very long) lines.  This showed up in complaints
from users trying to recompile MLton (our ML compiler).
As a simple test case, consider the C source file

	int
	a(int b)
	{
		int	c;

		c = b + b + b + ... + b;
		return (c);
	}
where you include 100,000 b's (so the line will have 400,004 bytes in it).
If you run this through `gcc -E', the output will only be about 7000 bytes
wide and will end in a `+', the rest having been discarded.

Please note, these lines would be rather ridiculous if generated by hand,
but they are the output of our compiler.  Automatically generated C is
quite common (consider the output of yacc, or lex for instance).
It is a real disaster that not only does cpp fail, but it fails silently,
with no error message and no funny exit status.
Comment 1 Cristian Gafton 2000-10-17 19:33:54 EDT
assigned to jakub
Comment 2 Jakub Jelinek 2000-11-13 06:17:16 EST
Will be fixed in cpp-2.96-64.

Note You need to log in before you can comment on or make changes to this bug.