Bug 7066 - xlint/gcc: "warning: integral constant too large"
Summary: xlint/gcc: "warning: integral constant too large"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.6-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-06-25 17:30 UTC by cmascott
Modified: 1998-06-27 13:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cmascott 1998-06-25 17:30:01 UTC
Xlint appears to have a bug.  It issues many of these:

	warning: integral constant too large

when in fact there is no such problem.

Fix: 

It turns out that this is really a bug in gcc 2.7.2.1.
Gcc -O fails to compile toicon() in lint1/cgram.c correctly.
To work around this:

1. Build xlint normally.

2. Delete lint1/cgram.o.

3. In the top-level xlint directory say

	make CFLAGS=

   (define CFLAGS to be empty).

   This will recompile just lint1/cgram.c without
   optimization, giving you a new lint1/lint1.

   NOTE: You MUST do this from the top-level xlint
   directory, not from the lint1 subdirectory.

4. Install the new lint1 in /usr/libexec.
How-To-Repeat: 
Run xlint (lint) on virtually any C source file.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-06-27 10:20:37 UTC
State Changed
From-To: open->suspended

awaiting committer 
should possibly be sent to the gcc people instead. 
Comment 2 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-06-27 13:33:51 UTC
State Changed
From-To: suspended->closed

From Bruce: 
-current already has a better workaround in rev.1.2 of lint1/cgram.y.