NetBSD Problem Report #25065

Received: (qmail 25625 invoked by uid 605); 5 Apr 2004 21:14:49 -0000
Message-Id: <Pine.BSF.4.58.0404052310550.40518@bacchus.pvv.ntnu.no>
Date: Mon, 5 Apr 2004 23:14:46 +0200 (CEST)
From: "Arne H. Juul" <arnej@pvv.ntnu.no>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: arnej@pvv.org
To: gnats-bugs@gnats.NetBSD.org
Cc: christos@netbsd.org
Subject: flex generates bad C++ code
X-Send-Pr-Version: 3.95

>Number:         25065
>Category:       bin
>Synopsis:       flex generates bad C++ code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 05 21:15:00 +0000 2004
>Closed-Date:    Mon Apr 05 21:17:58 +0000 2004
>Last-Modified:  Tue Apr 06 03:59:00 +0000 2004
>Originator:     Arne H Juul
>Release:        NetBSD 2.0B
>Organization:
        none
>Environment:

System: NetBSD blackbox 2.0B NetBSD 2.0B (BLACKBOX) #0: Sat Apr 3 02:19:13
CEST
2004 arnej@blackbox:/usr/obj/sys/arch/i386/compile/BLACKBOX i386
Architecture: i386
Machine: i386
>Description:
        When generating a lexer (actually from lilypond-2.2.0)
        using "%option c++" and "option debug" I got a C++ syntax
        error because the generated code used "std:endl" instead
        of "std::endl".
	Probably introduced by last commit which was:

	date: 2003/11/18 21:37:39;  author: christos;  state: Exp;  lines: +7 -7
	More g++-3 fixes:
        	- std:c{in,out,err}
       		- include <iostream>
        	- use std::endl instead of \n

>How-To-Repeat:
        Looks like this is only triggered with both %option c++
        and %option debug.
>Fix:
        The fix is trivial:

Index: gen.c
===================================================================
RCS file: /usr/cvs/src/usr.bin/lex/gen.c,v
retrieving revision 1.17
diff -u -r1.17 gen.c
--- gen.c	18 Nov 2003 21:37:39 -0000	1.17
+++ gen.c	5 Apr 2004 22:48:40 -0000
@@ -1436,7 +1436,7 @@
 		indent_puts( "if ( yy_act == 0 )" );
 		indent_up();
 		indent_puts( C_plus_plus ?
-			"std::cerr << \"--scanner backing up\" << std:endl;" :
+			"std::cerr << \"--scanner backing up\" << std::endl;" :
 			"fprintf( stderr, \"--scanner backing up\\n\" );" );
 		indent_down();
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: christos 
State-Changed-When: Mon Apr 5 17:17:47 EDT 2004 
State-Changed-Why:  
fixed, thanks 

From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/25065 CVS commit: src/usr.bin/lex
Date: Mon,  5 Apr 2004 21:17:27 +0000 (UTC)

 Module Name:	src
 Committed By:	christos
 Date:		Mon Apr  5 21:17:27 UTC 2004

 Modified Files:
 	src/usr.bin/lex: gen.c

 Log Message:
 PR/25065: Arne H Juul: Typo in debugging output.


 To generate a diff of this commit:
 cvs rdiff -r1.17 -r1.18 src/usr.bin/lex/gen.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: James Chacon <jmc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/25065 CVS commit: [netbsd-2-0] src/usr.bin/lex
Date: Tue,  6 Apr 2004 03:58:36 +0000 (UTC)

 Module Name:	src
 Committed By:	jmc
 Date:		Tue Apr  6 03:58:36 UTC 2004

 Modified Files:
 	src/usr.bin/lex [netbsd-2-0]: gen.c

 Log Message:
 Pullup rev 1.18 (requested by christos in ticket #68)

 Typo in debugging output. PR#25065


 To generate a diff of this commit:
 cvs rdiff -r1.17 -r1.17.2.1 src/usr.bin/lex/gen.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

  -current cvsupped 05 Apr 2004.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.