Bug 723878 - gcc-4.0.0 regression in '\' escape handling in gsub()
Summary: gcc-4.0.0 regression in '\' escape handling in gsub()
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Vojtech Vitek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-21 12:49 UTC by John Ellson
Modified: 2015-03-04 23:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 21:39:50 UTC
Type: ---


Attachments (Terms of Use)

Description John Ellson 2011-07-21 12:49:22 UTC
Description of problem:
gcc-4.0.0 regression in '\' escape handling in gsub()

gcc-3.1.8 works ok.

Version-Release number of selected component (if applicable):
gawk-4.0.0-1.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. echo '\\' | gawk '{gsub("\\\\","\\\\",$0); print($0);}'
2.
3.
  
Actual results:
\\

Expected results:
\\\\

Additional info:
This breaks the ~20 year old stringize.awk script in graphviz that converts postscript text into C strings.

This problem has also been reported by email to bug-gawk

Comment 1 John Ellson 2011-07-21 21:39:50 UTC
Sorry - must have been before my coffee this morning - this is a gawk bug, not gcc


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