You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. cat hello.go
package main
func test1() __asm__ ("test1");
func test2() int __asm__ ("test2");
func main() {}
2. gofmt -s -w hello.go
What is the expected output?
Formatted code
What do you see instead?
hello.go:3:22: expected ';', found '('
hello.go:4:18: expected ';', found 'IDENT' __asm__
Which compiler are you using (5g, 6g, 8g, gccgo)?
gccgo
Which operating system are you using?
Ubuntu 11.04
Which revision are you using? (hg identify)
weekly.2011-06-16 8791+
The text was updated successfully, but these errors were encountered:
Yes, but gofmt only claims to work on Go programs
as defined by the Go specification at
http://golang.org/doc/go_spec.html, and the
program is definitely not valid according to the spec.
Gccgo accepts an extended version of Go, just like
gcc accepts an extended version of C.
In both cases, tools that work on the specified
language may not work on programs using the
non-standard GNU extensions.
It would be good to figure out a way to make gofmt
run on typical programs used with gccgo, but that
way cannot be to let these annotations propagate.
Another way, for example, would be to say that
func test1()
has the right default, and if you want to do more you
write a C program. In the long term yet another way
is that cgo should be made to work with gccgo.
Russ
by lockalsash:
The text was updated successfully, but these errors were encountered: