Commit Graph

368 Commits

Author SHA1 Message Date
Russ Cox
6361f52fc4 gc: be pickier about slice, chan, array, and map sizes
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1032044
2010-05-01 13:15:42 -07:00
Russ Cox
c66b49845c 8g: bug272
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1043042
2010-04-30 14:04:34 -07:00
Russ Cox
253fd30e66 gc: bug271
Fixes #662.

R=ken2
CC=golang-dev
https://golang.org/cl/978043
2010-04-30 13:27:08 -07:00
Russ Cox
560283c880 gc: bug270
Fixes #746.

R=ken2
CC=golang-dev
https://golang.org/cl/1040042
2010-04-30 13:04:16 -07:00
Russ Cox
77817e08d5 gc: never include ( ) on singleton func return type
Fixes #749.

R=ken2
CC=golang-dev
https://golang.org/cl/963043
2010-04-29 16:07:14 -07:00
Russ Cox
10eb76b04e gc: bug268
Fixes #745.

R=ken2
CC=golang-dev
https://golang.org/cl/1008045
2010-04-29 15:52:27 -07:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Russ Cox
d9254d00f9 gc: zero unnamed return values on entry if func has defer
R=ken2
CC=golang-dev
https://golang.org/cl/891050
2010-04-12 14:28:27 -07:00
Russ Cox
fe7826858c gc: make sure main.main has correct type
R=ken2
CC=golang-dev
https://golang.org/cl/883049
2010-04-11 14:51:35 -07:00
Russ Cox
00f9f0c056 single argument panic
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.

stop on error in doc/progs/run

R=r
CC=golang-dev
https://golang.org/cl/850041
2010-03-30 10:34:57 -07:00
Russ Cox
3908c16ffe gc: bug265
Fixes #700.

R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Russ Cox
d2cdb24786 gc: tests omitted from the last bug fix
R=ken2
CC=golang-dev
https://golang.org/cl/748041
2010-03-24 22:12:59 -07:00
Rob Pike
325cf8ef21 delete all uses of panicln by rewriting them using panic or,
in the tests, println+panic.
gofmt some tests too.

R=rsc
CC=golang-dev
https://golang.org/cl/741041
2010-03-24 16:46:53 -07:00
Russ Cox
4f89dcdf99 5g/6g/8g: fix double function call in slice
Fixes #654.

R=ken2
CC=golang-dev
https://golang.org/cl/310041
2010-03-08 14:19:28 -08:00
Russ Cox
ba50599e46 8g: make a[byte(x)] truncate x
R=ken2
CC=golang-dev
https://golang.org/cl/223069
2010-02-26 13:15:29 -08:00
Russ Cox
1734cb02e7 gc: recursive interface embedding
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/215048
2010-02-18 11:15:36 -08:00
Russ Cox
fb5506600f 8g: respect ullman numbers in float comparison
Fixes #602.

R=ken2
CC=golang-dev
https://golang.org/cl/212045
2010-02-17 15:28:45 -08:00
Russ Cox
7b5789b584 gc: undo attempt at fixing recursive interface embedding
Fixes #582.

Update #287
Status: Accepted
Bug fix was too intrusive; undo and reopen issue.

R=ken2
CC=golang-dev
https://golang.org/cl/209044
2010-02-16 17:44:15 -08:00
Russ Cox
e7fc5c2789 gc: test & fix handling of very long string constants
R=ken2
CC=golang-dev
https://golang.org/cl/207106
2010-02-16 10:16:24 -08:00
Russ Cox
5ab8f00bf8 gc: diagnose invalid array bounds
Fixes #587.

R=ken2
CC=golang-dev
https://golang.org/cl/207085
2010-02-12 13:59:02 -08:00
Ian Lance Taylor
4b4c6ab02d Struct field ambiguity test.
gccgo gets this wrong at the moment.

R=rsc
CC=golang-dev
https://golang.org/cl/205044
2010-02-08 15:40:09 -08:00
Ian Lance Taylor
3c686bd23f Match gccgo error message.
bug251.go:11:2: error: invalid recursive interface

R=rsc
CC=golang-dev
https://golang.org/cl/204052
2010-02-05 20:56:20 -08:00
Ian Lance Taylor
db3ec4f239 Match gccgo error messages.
bug121.go:12:3: error: name list not allowed in interface type
bug121.go:16:2: error: expected signature or type name

semi1.go:10:76: error: unexpected semicolon or newline before ‘{’
semi1.go:10:5: error: reference to undefined name ‘x’
semi1.go:10:8: error: reference to undefined name ‘y’
semi1.go:12:3: error: reference to undefined name ‘z’

semi2.go:10:79: error: unexpected semicolon or newline before ‘{’
semi2.go:10:9: error: reference to undefined name ‘x’

semi3.go:10:79: error: unexpected semicolon or newline before ‘{’
semi3.go:10:6: error: reference to undefined name ‘x’
semi3.go:10:9: error: reference to undefined name ‘y’
semi3.go:10:12: error: reference to undefined name ‘z’
semi3.go:12:3: error: reference to undefined name ‘z’

semi4.go:11:2: error: unexpected semicolon or newline before ‘{’
semi4.go:10:6: error: reference to undefined name ‘x’
semi4.go:12:3: error: reference to undefined name ‘z’

semi5.go:10:1: error: unexpected semicolon or newline before ‘{’

semi7.go:11:2: error: unexpected semicolon or newline before ‘else’
semi7.go:10:5: error: reference to undefined name ‘x’

slice.go:9:11: error: missing lower bound in slice expression
slice.go:9:9: error: reference to undefined name ‘y’
slice.go:9:12: error: reference to undefined name ‘z’

R=rsc
CC=golang-dev
https://golang.org/cl/201061
2010-02-04 21:31:30 -08:00
Russ Cox
8bef7fdc39 bug252: make ... vs ...T crossing an error, at least for now
R=r
CC=golang-dev
https://golang.org/cl/199066
2010-02-02 15:00:13 -08:00
Russ Cox
44898c7b76 gc: bug250, bug251 - recursive interface types
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/199057
2010-02-01 23:58:49 -08:00
Ian Lance Taylor
d00210f519 Match gccgo error messages.
bug249.go:10:5: error: incompatible type in initialization
bug249.go:26:5: error: incompatible type in initialization

R=rsc
CC=golang-dev
https://golang.org/cl/198058
2010-02-01 23:27:33 -08:00
Russ Cox
674458e1c4 gc: bug246
R=ken2
CC=golang-dev
https://golang.org/cl/198057
2010-02-01 23:05:15 -08:00
Russ Cox
0bd41e2ff0 gc: bug242
R=ken2
CC=golang-dev
https://golang.org/cl/198053
2010-02-01 22:18:51 -08:00
Ian Lance Taylor
9a65381b77 Fix for gccgo, which uses a package prefix.
R=rsc
CC=golang-dev
https://golang.org/cl/198046
2010-02-01 16:26:50 -08:00
Ian Lance Taylor
001d9917f4 Match gccgo error messages.
I have to admit that "cannot use type p.T as type p.T" is a
bit weak.  8g gives a similar error ("cannot use v1 (type p.T)
as type p.T in assignment").

bug3.go:37:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:38:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:43:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:44:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:49:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:50:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:55:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:56:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:57:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:58:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:59:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:60:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:61:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:62:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))

R=rsc
CC=golang-dev
https://golang.org/cl/199044
2010-02-01 16:25:55 -08:00
Ian Lance Taylor
a91e524bc1 Match gccgo error messages.
bug238.go:11:7: error: invalid constant type
bug238.go:12:7: error: invalid constant type
bug238.go:13:7: error: invalid constant type
bug238.go:14:7: error: invalid constant type
bug238.go:15:7: error: invalid constant type
bug238.go:16:7: error: invalid constant type
bug238.go:17:7: error: invalid constant type

R=rsc
CC=golang-dev
https://golang.org/cl/194159
2010-01-30 11:38:06 -08:00
Ian Lance Taylor
f4d714ca2d Match gccgo error message.
bug231.go:20:4: error: incompatible types in assignment (type has no methods)

R=rsc
CC=golang-dev
https://golang.org/cl/194156
2010-01-30 11:31:06 -08:00
Ian Lance Taylor
5163d50c7d Recognize gccgo error messages.
bug228.go:11:25: error: invalid use of ‘...’
bug228.go:13:13: error: ‘...’ only permits one name
bug228.go:15:20: error: ‘...’ must be last parameter
bug228.go:17:7: error: expected type
bug228.go:19:8: error: expected type

R=rsc
CC=golang-dev
https://golang.org/cl/196077
2010-01-29 22:38:39 -08:00
Russ Cox
7abb4b3a96 gc: fix chan <- chan precedence.
also allow func() func().

R=ken2
CC=golang-dev
https://golang.org/cl/194078
2010-01-26 10:40:28 -08:00
Russ Cox
1912632019 runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.

R=ken2
CC=golang-dev
https://golang.org/cl/194053
2010-01-25 18:23:20 -08:00
Russ Cox
3b1a0355b6 5l, 6l, 8l: accept only one object file
(package main; others are pulled in automatically)

R=ken2
CC=golang-dev
https://golang.org/cl/194069
2010-01-25 17:53:43 -08:00
Russ Cox
d1b14a6fb0 gc: bug247, reported by rob
R=ken2
CC=golang-dev
https://golang.org/cl/194051
2010-01-24 22:42:18 -08:00
Russ Cox
fe01d4c8a1 gc: const debug bool = false
R=ken2
CC=golang-dev
https://golang.org/cl/186232
2010-01-19 15:25:44 -08:00
Russ Cox
ff6e310b00 gc: bug245
Fixes #529.

R=ken2
CC=golang-dev
https://golang.org/cl/186215
2010-01-18 17:30:15 -08:00
Russ Cox
8e996304f3 gc: multiple return value at top-level invoked multiple times
Fixes #402.

R=ken2
CC=golang-dev
https://golang.org/cl/186214
2010-01-18 17:00:38 -08:00
Russ Cox
e0059ae811 gc: bug243
Fixes #481.

R=ken2
CC=golang-dev
https://golang.org/cl/186213
2010-01-18 16:52:18 -08:00
Russ Cox
307a899d5b gc: bug238
Fixes #471.

R=ken2
CC=golang-dev
https://golang.org/cl/181184
2010-01-08 00:01:03 -08:00
Russ Cox
1b1f39eb86 gc: bug219, bug239, bug240
Fixes #475.

R=ken2
CC=golang-dev
https://golang.org/cl/183157
2010-01-07 23:24:48 -08:00
Russ Cox
c6f4d68667 gc: bug241
Fixes #495.

R=ken2
CC=golang-dev
https://golang.org/cl/183156
2010-01-07 23:20:00 -08:00
Ian Lance Taylor
939bab606a Add a test for issue 337.
gccgo currently miscompiles this test.

R=rsc
CC=golang-dev
https://golang.org/cl/181050
2009-12-23 22:08:27 -08:00
Ian Lance Taylor
fa98cf6eef More evaluation order tests, for global variables and switch.
gccgo currently fails this test.

R=rsc
CC=golang-dev
https://golang.org/cl/179108
2009-12-18 21:59:47 -08:00
Russ Cox
6a4b2492b3 gc: fix compiler crash
R=ken2
CC=dho
https://golang.org/cl/179097
2009-12-17 15:08:55 -08:00
Russ Cox
d16bc7a9f2 runtime: return zero value in x, ok = <-c when ok == false
Fixes #401.

R=ken2
https://golang.org/cl/180053
2009-12-15 16:59:23 -08:00
Russ Cox
c715b58dad gc: fix import name resolution
Fixes #403.

R=ken2
https://golang.org/cl/180052
2009-12-15 16:44:28 -08:00
Russ Cox
5d754bfaea gc: bug fixes.
* better error for lookup of unexported field
  * do not assign "ideal string" type to typed string literal
  * do not confuse methods and fields during interface check

Fixes #410.
Fixes #411.
Fixes #426.

R=ken2
https://golang.org/cl/179069
2009-12-15 16:22:04 -08:00
Russ Cox
101f499fa5 gc: allow ... in method lists
R=ken2
https://golang.org/cl/179070
2009-12-15 16:20:37 -08:00
Russ Cox
d122bb2193 gc: double-check usage of ...
Fixes #423.

R=ken2
https://golang.org/cl/180045
2009-12-15 14:26:50 -08:00
Russ Cox
0282cc5e74 gc: var x, ok = m[y]
Fixes #384.

R=ken2
https://golang.org/cl/179061
2009-12-15 14:26:33 -08:00
Ian Lance Taylor
84e7cb0611 Tweak test to work with both 6g and gccgo.
Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.

6g:
bug215.go:12: invalid recursive type A

gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’

R=rsc
https://golang.org/cl/180044
2009-12-15 13:57:24 -08:00
Russ Cox
b301351df9 test/fixedbug: drop obsolete bug125, bug166
R=gri
CC=golang-dev
https://golang.org/cl/173044
2009-12-10 12:54:30 -08:00
Robert Griesemer
60d4e30dbb make test/fixedbugs save for optional semis
R=rsc
https://golang.org/cl/173045
2009-12-10 11:25:54 -08:00
Russ Cox
9da6666a8a gc: check for assignment to private fields during initialization
R=ken2
https://golang.org/cl/165055
2009-12-03 22:09:58 -08:00
Russ Cox
c6e316a4b9 gc: handle _ = <-c in select.
Fixes #238.

R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
05a1eb1ab0 gc: recursive type error
Fixes #245.

R=ken2
https://golang.org/cl/164094
2009-12-03 01:12:02 -08:00
Russ Cox
41861a8812 gc: better diagnosis of initialization loops
Fixes bug 292.

R=ken2
https://golang.org/cl/164093
2009-12-03 00:51:03 -08:00
Russ Cox
e733766dda gc: minor import grammar bug fixes
Fixes #364.

R=ken2
https://golang.org/cl/164092
2009-12-03 00:10:32 -08:00
Russ Cox
272d156357 gc: function argument ordering bug
Fixes #370.

R=ken2
https://golang.org/cl/163097
2009-12-02 23:54:51 -08:00
Russ Cox
b7c4314ecb gc: correct type check for x, ok map assignment
Fixes #288.

R=ken2
https://golang.org/cl/157162
2009-11-24 16:11:48 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Robert Griesemer
e6f85af2bb cleaning up bug132
R=rsc
http://go/go-review/1017012
2009-11-02 09:42:53 -08:00
Ian Lance Taylor
d7ad3c4e86 Match gccgo error messages.
bug205.go:14:12: error: index must be integer
bug205.go:15:12: error: index must be integer
bug205.go:16:12: error: incompatible type for map index

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35957
CL=35960
2009-10-21 11:42:09 -07:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
a15648658f bug196
R=ken
OCL=35905
CL=35905
2009-10-19 21:10:29 -07:00
Russ Cox
62c4818ee0 bug136
R=ken
OCL=35902
CL=35904
2009-10-19 20:39:18 -07:00
Russ Cox
1be74762c1 bug169
R=ken
OCL=35899
CL=35899
2009-10-19 19:55:17 -07:00
Russ Cox
4c3a85d73a 6g bug fixes:
* bug211
 * embedded interfaces with lowercase methods
 * var _ = f() at top level

R=ken
OCL=35898
CL=35898
2009-10-19 19:27:40 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Russ Cox
c736b6579f bug209
R=ken
OCL=35546
CL=35546
2009-10-09 16:01:32 -07:00
Russ Cox
680ee6af63 add & fix bug208, from ken.
fix bug198.

R=ken
OCL=35504
CL=35507
2009-10-08 23:03:34 -07:00
Russ Cox
55edf49a01 add & fix bug207: rewritten if condition
was discarding initialization work.

R=ken
OCL=35454
CL=35457
2009-10-07 22:19:42 -07:00
Russ Cox
6f1698774d undo 35108 (disallow parens around type in struct literal).
allow parens around [...]int in struct literal.

R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Russ Cox
9c3c140984 disallow parens around type in struct literal syntax,
per discussion with gri.

R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Russ Cox
7743ffead4 disallow interface { x, y() }
R=ken
OCL=35042
CL=35044
2009-09-28 14:05:34 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
ae54cf73ca last round: non-package code
R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
2009-09-15 12:42:24 -07:00
Russ Cox
1a3198907b fix "declared and not used" in tests;
also template/template.go, missed last time.

R=r
DELTA=116  (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Russ Cox
f2a8cd5ad9 corrected bug187; dropped on the floor somehow
R=austin
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=34340
CL=34346
2009-09-03 16:17:06 -07:00
Russ Cox
a18208fb60 fix range on invalid utf8 bug
R=r
DELTA=42  (21 added, 20 deleted, 1 changed)
OCL=34328
CL=34333
2009-09-03 13:56:06 -07:00
Russ Cox
a1391c2d13 fix one bug involving [...] constructors.
added iant's bug202 (in main code)
and ken's bug203 (in init function).
bug187 remains at large.

R=ken
OCL=34293
CL=34293
2009-09-02 23:26:13 -07:00
Russ Cox
ee2d5128d6 the last bug involving type hashes
R=ken
OCL=34244
CL=34249
2009-09-02 09:09:32 -07:00
Russ Cox
bebe06a784 type switch bug involving function parameter names
R=ken
OCL=34232
CL=34232
2009-09-01 18:04:49 -07:00
Russ Cox
27c4e7e74e catch package net import "net" for release
R=ken
OCL=34205
CL=34207
2009-09-01 14:12:09 -07:00
Ian Lance Taylor
1a05177d44 Match gccgo error messages.
bug197.go:10:5: error: incompatible type in initialization
bug197.go:11:5: error: incompatible type in initialization
bug197.go:12:5: error: incompatible type in initialization
bug197.go:13:5: error: incompatible type in initialization
bug197.go:20:13: error: incompatible types in binary expression
bug197.go:21:27: error: incompatible types in binary expression

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=34135
CL=34177
2009-08-31 21:39:08 -07:00
Russ Cox
6e8524be18 array index bug
x[i]
x not addressable, i >= UINF
double evaluated i
second eval killed live registers

manifested as gob instability

R=ken
OCL=34097
CL=34099
2009-08-30 18:47:48 -07:00
Russ Cox
d66d65da96 bug132
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Ian Lance Taylor
92ac4bff74 Match gccgo error messages.
bug192.go:11:5: error: redefinition of ‘fmt’
bug192.go:9:8: note: previous definition of ‘fmt’ was here

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33780
CL=33790
2009-08-24 15:56:39 -07:00
Russ Cox
14be733a25 bug197
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
ef3e6810b8 bug189
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
28b655ea07 more interface embedding tests
6g's error for I4 is not quite accurate
(it calls I4 a non-interface) but also
not a crash or infinite loop.

R=iant
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33701
CL=33709
2009-08-21 21:30:24 -07:00
Russ Cox
59e2e54eab fix bug195
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Rob Pike
770485e522 add bug to capture double declaration of name in file and package block
R=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=33554
CL=33563
2009-08-19 17:37:23 -07:00
Russ Cox
63aeaa2a03 fix import dot bug
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Ian Lance Taylor
f7e4fc9b1f Match gccgo error messages.
bug165.go:13:6: error: invalid recursive type 'S'

This is a different line from the 6g error message, which is
"invalid map key type".  I accomodated both compilers by
merging the line.

bug188.go:13:2: error: unexpected reference to package

I made the error message less specific, which I think is fine
here.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33398
CL=33426
2009-08-17 17:40:52 -07:00
Rob Pike
74dd0ab670 fix up some irregular indentation
R=rsc
OCL=33382
CL=33391
2009-08-17 13:30:22 -07:00
Ian Lance Taylor
91173b8930 Recognize gccgo error messages.
bug039.go:6:7: error: redefinition of 'x'
bug039.go:5:1: note: previous definition of 'x' was here

bug049.go:6:9: error: incompatible types in binary expression

bug062.go:6:7: error: incompatible type in initialization

bug086.go:5:1: error: control reaches end of non-void function

bug103.go:8:2: error: variable has no type

bug121.go:9:2: error: expected signature or type name

bug131.go:7:7: error: incompatible type in initialization

bug165.go:10:8: error: expected complete type

bug171.go:5:1: error: control reaches end of non-void function
bug171.go:6:1: error: control reaches end of non-void function

bug172.go:7:6: error: expected integer type

bug182.go:7:2: error: if statement expects boolean expression

bug183.go:10:5: error: incompatible types in assignment
bug183.go:19:5: error: incompatible types in assignment

R=rsc
DELTA=15  (0 added, 0 deleted, 15 changed)
OCL=33168
CL=33175
2009-08-13 09:42:28 -07:00
Russ Cox
3e98a40793 bug188 - sort(x)
R=ken
OCL=33123
CL=33123
2009-08-12 15:58:31 -07:00
Russ Cox
b5c57fea96 delete forward type declarations
R=r
DELTA=163  (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Russ Cox
5b62b19d43 convert non-pkg go files to whole-package compilation.
mostly removing forward declarations.

R=r
DELTA=138  (2 added, 127 deleted, 9 changed)
OCL=33068
CL=33099
2009-08-12 13:18:54 -07:00
Russ Cox
866b272336 bug186 - f(iota)
R=ken
OCL=33051
CL=33051
2009-08-11 17:05:22 -07:00
Russ Cox
6be0f50b97 bug159
R=ken
OCL=32902
CL=32914
2009-08-07 16:47:54 -07:00
Russ Cox
39b12e2dcb bug185 - return b,a from func() (a,b int)
R=ken
OCL=32900
CL=32900
2009-08-07 14:38:31 -07:00
Russ Cox
d1ee5d6e8f bug184 - assignment compatibility in unpacked multireturn
R=ken
OCL=32890
CL=32894
2009-08-07 14:00:18 -07:00
Russ Cox
aa7bd48389 bug183 - embedded vs non-embedded struct field in eqtype
R=ken
OCL=32888
CL=32888
2009-08-07 13:23:09 -07:00
Russ Cox
468f244416 bug182 - compiler crash
R=ken
OCL=32887
CL=32887
2009-08-07 13:17:28 -07:00
Russ Cox
6c2738eb43 bug181 - type T *struct { T } is an invalid embedded type
R=ken
OCL=32886
CL=32886
2009-08-07 13:14:01 -07:00
Russ Cox
54b403723b delay := processing
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
4dec8ef35a get function calls out of the way before
allocating registers in shift and div.

fix behavior when res == a reserved register.

R=ken
OCL=32765
CL=32767
2009-08-04 19:16:57 -07:00
Russ Cox
9dc22b6d6f more 6g reorg; checkpoint.
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."

R=ken
OCL=32661
CL=32667
2009-08-03 11:58:52 -07:00
Russ Cox
b754b4348f delete some code from walkexpr that is now
handled by typecheck.

second switch is gone

move floating point minus into back end

R=ken
OCL=32558
CL=32558
2009-07-30 18:56:44 -07:00
Russ Cox
34b277f046 use errchk in more places.
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.

R=r
DELTA=143  (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542
2009-07-30 16:46:14 -07:00
Russ Cox
c217c16a06 bug136 unfixed
R=austin
DELTA=35  (21 added, 14 deleted, 0 changed)
OCL=32469
CL=32474
2009-07-29 15:39:05 -07:00
Russ Cox
2946069e3f break and continue fixes
labeled break/continue was using
first loop with any label,
not first loop with the right label.

R=ken
OCL=32453
CL=32458
2009-07-29 14:49:01 -07:00
Russ Cox
123ff2ebb8 bug177: anonymous struct fields in reflect
(reported by iant)

R=r
DELTA=50  (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385
2009-07-28 17:01:46 -07:00
Russ Cox
18840f5429 constant keys for array initializers
R=ken
OCL=32261
CL=32261
2009-07-27 17:58:25 -07:00
Russ Cox
eece85c9a7 move bug148, already fixed, to fixedbugs
R=ken
OCL=32257
CL=32257
2009-07-27 17:32:02 -07:00
Russ Cox
b7dd312c93 bug170; fix test for bug175
R=ken
OCL=32255
CL=32255
2009-07-27 17:24:07 -07:00
Russ Cox
a587d9a73f multiple return in := bug
R=ken
OCL=32253
CL=32253
2009-07-27 16:59:10 -07:00
Russ Cox
059bbdd340 print(1<<x)
R=ken
OCL=32252
CL=32252
2009-07-27 16:17:09 -07:00
Russ Cox
811e59f2fa named string type bugs
R=ken
OCL=32244
CL=32244
2009-07-27 15:16:28 -07:00
Russ Cox
03b25a92a3 catch
a := true;
	a |= a;
in the front end.

R=ken
OCL=32240
CL=32243
2009-07-27 14:55:14 -07:00
Russ Cox
0b2683d1ee do not insert implicit "return;" in empty function body
R=ken
OCL=32239
CL=32239
2009-07-27 14:36:32 -07:00
Russ Cox
7472f4c951 bug168 (dsymonds) + fix
R=ken
OCL=31399
CL=31399
2009-07-09 12:08:50 -07:00
Russ Cox
a1b64821f8 bug167
R=ken
OCL=31295
CL=31295
2009-07-07 11:48:22 -07:00
Russ Cox
8a1bfe89b2 change bug163 to use actual non-letter in identifier
R=r,iant
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31146
CL=31148
2009-07-03 13:33:00 -07:00
Ian Lance Taylor
7ae0c67825 Recognize gccgo error message.
bug022.go:8:13: error: attempt to index object which is not array, string, or map

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31082
CL=31089
2009-07-02 15:55:17 -07:00
Russ Cox
5d5904bb4d bug163 bug164 bug166
R=ken
OCL=30889
CL=30889
2009-06-29 17:46:22 -07:00
Russ Cox
df36629d76 bug041 not a bug.
can now forward declare across files

R=r
DELTA=15  (0 added, 15 deleted, 0 changed)
OCL=30873
CL=30880
2009-06-29 17:21:33 -07:00
Russ Cox
480f51243c bug165
R=ken
OCL=30783
CL=30783
2009-06-25 21:02:39 -07:00
Russ Cox
cf370a6206 add ./ to imports where necessary
R=r
DELTA=51  (4 added, 4 deleted, 43 changed)
OCL=30759
CL=30778
2009-06-25 20:13:56 -07:00
Russ Cox
4c5c0f437f update tests for CL 30586.
won't submit unless 30586 goes in.

R=r
DELTA=94  (65 added, 16 deleted, 13 changed)
OCL=30592
CL=30755
2009-06-25 14:44:09 -07:00
Rob Pike
23d9197160 canonicalize bug122.go
R=rsc
DELTA=6  (1 added, 3 deleted, 2 changed)
OCL=30604
CL=30604
2009-06-22 14:40:08 -07:00
Russ Cox
3751b259cb bug140 is fixed
R=ken
OCL=29989
CL=29999
2009-06-06 19:28:01 -07:00
Russ Cox
2f2577a4f6 bug161, fixed
R=ken
OCL=29907
CL=29907
2009-06-04 16:18:13 -07:00
Russ Cox
f51ca384eb fix handling of floating point zero constant 0p+0
R=r
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=29875
CL=29875
2009-06-04 11:06:37 -07:00
Russ Cox
d6a9817051 bug157
R=ken
OCL=29651
CL=29653
2009-05-30 21:18:15 -07:00
Ken Thompson
be63b6dc44 bug 158
R=r
OCL=29646
CL=29646
2009-05-30 17:06:51 -07:00
Ken Thompson
fbcbcdbb1d bug 156
R=r
OCL=29623
CL=29623
2009-05-29 15:34:47 -07:00
Ken Thompson
1c7bee0567 bug 155
R=r
OCL=29619
CL=29619
2009-05-29 14:42:24 -07:00
Ken Thompson
3b37b02834 bug 149
R=r
OCL=29612
CL=29612
2009-05-29 13:44:30 -07:00
Ken Thompson
b3f303ec9a bug 153
R=r
OCL=29479
CL=29479
2009-05-27 18:37:02 -07:00