modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/bug017.go (about)

     1  // run
     2  
     3  // Copyright 2009 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package main
     8  
     9  func main() {
    10  	var s2 string = "\a\b\f\n\r\t\v";  // \r is miscompiled
    11  	_ = s2;
    12  }
    13  /*
    14  main.go.c: In function ‘main_main’:
    15  main.go.c:20: error: missing terminating " character
    16  main.go.c:21: error: missing terminating " character
    17  main.go.c:24: error: ‘def’ undeclared (first use in this function)
    18  main.go.c:24: error: (Each undeclared identifier is reported only once
    19  main.go.c:24: error: for each function it appears in.)
    20  main.go.c:24: error: syntax error before ‘def’
    21  main.go.c:24: error: missing terminating " character
    22  main.go.c:25: warning: excess elements in struct initializer
    23  main.go.c:25: warning: (near initialization for ‘slit’)
    24  main.go.c:36: error: syntax error at end of input
    25  */