From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26127 invoked by alias); 27 Mar 2007 17:44:01 -0000 Received: (qmail 26086 invoked by uid 48); 27 Mar 2007 17:43:47 -0000 Date: Tue, 27 Mar 2007 17:44:00 -0000 Subject: [Bug c/31377] New: wrap_help error X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "george at houseofellery dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg02595.txt.bz2 in the file "opts.c", in the function "wrap_help", the var 'room' is calculated as the space remaining between the the left item field width and the rightmost column (which defaults to 80 chars). it is then compared to the columns value: room = columns - 3 - MAX (col_width, item_width); if (room > columns) room = 0; len = remaining; I assume this is supposed to determine if the left field is taking up more than the entire width of the line and if so, sets it to 0 as there is no room left. to do this, the correct code should be room = columns - 3 - MAX (col_width, item_width); if (room < 0) room = 0; len = remaining; admitedly, since all the help lines that print out don't have a left field that comes close to taking up the entire line, this case never occurs, so this is a trival case. -- Summary: wrap_help error Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: george at houseofellery dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31377