summaryrefslogtreecommitdiff
path: root/src/cmd/cgo/gcc.go
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-24/+98
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-30/+30
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-19/+46
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-12/+47
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-14/+130
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-142/+401
2010-07-01strings and bytes.Split: make count of 0 mean 0, not infinite.Rob Pike1-3/+3
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev http://codereview.appspot.com/1704044 Committer: Rob Pike <r@golang.org>
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer1-12/+12
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2010-02-25go/printer, gofmt: align comments in multi-line expression listsRobert Griesemer1-7/+7
- gofmt -w src misc - improves several lists and fixes minor degradation introduced with the fix for issue 628 - removed some dead code (stringList) R=rsc CC=golang-dev http://codereview.appspot.com/223058
2010-02-25strings: delete Runes, BytesRuss Cox1-2/+2
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-24go/ast: streamline representation of field listsRobert Griesemer1-3/+3
- always include position information about opening/closing parens/braces - replace uses of []*ast.Field with *ast.FieldList Fixes issue 473. R=rsc CC=golang-dev http://codereview.appspot.com/223043
2010-01-27More steps towards tracking of identifier scopes.Robert Griesemer1-1/+1
- provide scope to parse functions; if non-nil, parser uses the scope to declare and lookup identifiers - resolve forward references where possible R=rsc CC=golang-dev http://codereview.appspot.com/194098
2010-01-15 Steps towards tracking scopes for identifiers.Robert Griesemer1-6/+6
- Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change. R=rsc CC=golang-dev, rog http://codereview.appspot.com/189080
2010-01-13cgo: Only allow numeric / string / character type constants for referencesDevon H. O'Dell1-1/+7
to #defined things. Fixes issue 520. R=rsc, rsaarelm CC=golang-dev http://codereview.appspot.com/186138 Committer: Russ Cox <rsc@golang.org>
2010-01-13cgo: handle C99 bool typeDevon H. O'Dell1-1/+7
Fixes issue 307. R=rsc CC=golang-dev http://codereview.appspot.com/186073 Committer: Russ Cox <rsc@golang.org>
2010-01-11 cgo: Make constants #define'd in C available to Go (as consts)Devon H. O'Dell1-2/+66
Fixes issue 435 R=rsc CC=golang-dev http://codereview.appspot.com/181161 Committer: Russ Cox <rsc@golang.org>
2010-01-06cgo: Use -fno-eliminate-unused-debug-types when calling gcc to for dwarf stabs.Devon H. O'Dell1-0/+1
This keeps debug symbols in for e.g. unreferenced enums. Fixes issue 479 R=rsc CC=golang-dev, waltermundt http://codereview.appspot.com/181102 Committer: Russ Cox <rsc@golang.org>
2009-12-17Use BitSize instead of the field's type native ByteSize when calculatingDevon H. O'Dell1-0/+3
structs containing bitfields. Fixes issue 163. R=rsc CC=golang-dev http://codereview.appspot.com/180059 Committer: Russ Cox <rsc@golang.org>
2009-12-15This patch enables cgo utility to correctly convert enums in the C sourceMoriyoshi Koizumi1-25/+55
into consts in the resulting Go source. Previously known as issue 161047, which I deleted accidentally. Fixes issue 207. R=rsc http://codereview.appspot.com/166059 Committer: Russ Cox <rsc@golang.org>
2009-12-15 1) Change default gofmt default settings forRobert Griesemer1-206/+206
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 1st set of files. R=rsc CC=agl, golang-dev, iant, ken2, r http://codereview.appspot.com/180047
2009-11-29cgo: use C type void for opaque types if dwarf.Common().Type returns nothingEden Li1-0/+3
Ideally, the C name would come from the typedef or pointer that references the Size<0 type, but we can't easily generate this without performing a look-ahead to see if any referencing type will become opaque. Fixes issue 334. Fixes issue 281. R=rsc http://codereview.appspot.com/161056 Committer: Russ Cox <rsc@golang.org>
2009-11-23 cgo translates empty function arguments into void instead of dying with ↵Eden Li1-0/+9
'unexpected type: ...'. Fixes issue 162. R=rsc http://codereview.appspot.com/157147 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-2/+2
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-19cgo now renders types with unknown size as [0]byte instead of raising aEden Li1-2/+5
fatal error. Fixes issue 126. R=rsc http://codereview.appspot.com/157101 Committer: Russ Cox <rsc@golang.org>
2009-11-18Mangle C struct fields that happen to be named after Go keywords by ↵Eden Li1-1/+30
prefixing them with _. Collisions with existing fields are resolved by prefixing the new Go identifier with _ until it matches nothing else in the struct. Fixes issue 36. R=rsc http://codereview.appspot.com/157061 Committer: Russ Cox <rsc@golang.org>
2009-11-17cgo no longer translates function args that are void* intoEden Li1-1/+5
unsafe.Pointer. Fixes issue 254. R=rsc http://codereview.appspot.com/157060 Committer: Russ Cox <rsc@golang.org>
2009-11-11cgo: add more information about gcc output parsing failuresRuss Cox1-0/+4
R=r http://codereview.appspot.com/152084
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-5/+5
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1024040
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-72/+72
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-3/+1
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed 6l 8l cgoRobert Griesemer1-25/+27
R=r http://go/go-review/1020002
2009-11-02Fix cgo for GCC 4.4Adam Langley1-6/+6
Firstly, with -Werror, GCC switched to printing warnings starting with "error:". Widening the string matches solves this as the messages are otherwise unchanged. Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all the offsets and requires the relocation section for .debug_info to be processed in order to result in valid DWARF data. Thus we add minimal handling for relocation sections, which is sufficient for our needs. BUG=1 Fixes issue 1. R=rsc, iant CC=go-dev http://go/go-review/1017003
2009-10-038c, 8l dynamic loading support.Russ Cox1-2/+14
better mach binaries. cgo working on darwin+linux amd64+386. eliminated context switches - pi is 30x faster. add libcgo to build. on snow leopard: - non-cgo binaries work; all tests pass. - cgo binaries work on amd64 but not 386. R=r DELTA=2031 (1316 added, 626 deleted, 89 changed) OCL=35264 CL=35304
2009-09-30cgo working on linux/386Russ Cox1-6/+6
R=r DELTA=70 (47 added, 4 deleted, 19 changed) OCL=35167 CL=35171
2009-09-24cgo checkpoint.Russ Cox1-4/+428
can write all 3 output files and then compile them by hand. R=r DELTA=919 (841 added, 16 deleted, 62 changed) OCL=34954 CL=34973
2009-09-18cgo: can look up C identifier kind (type or value) and typeRuss Cox1-0/+203
gmp.go:197:4: type mpz_t C type mpz_t gmp.go:205:2: call mpz_init C value func(mpz_ptr) void gmp.go:206:2: call mpz_set C value func(mpz_ptr, mpz_srcptr) void gmp.go:221:2: call mpz_init C value func(mpz_ptr) void gmp.go:227:7: call size_t C type size_t gmp.go:228:2: call mpz_export C value func(*void, *size_t, int, size_t, int, size_t, mpz_srcptr) *void gmp.go:235:13: call mpz_sizeinbase C value func(mpz_srcptr, int) size_t gmp.go:241:2: call mpz_set C value func(mpz_ptr, mpz_srcptr) void gmp.go:252:3: call mpz_import C value func(mpz_ptr, size_t, int, size_t, int, size_t, *const void) void gmp.go:261:2: call mpz_set_si C value func(mpz_ptr, long int) void gmp.go:273:5: call mpz_set_str C value func(mpz_ptr, *const char, int) int gmp.go:282:9: call mpz_get_str C value func(*char, int, mpz_srcptr) *char gmp.go:287:3: call mpz_clear C value func(mpz_ptr) void gmp.go:302:2: call mpz_add C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:311:2: call mpz_sub C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:320:2: call mpz_mul C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:329:2: call mpz_tdiv_q C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:339:2: call mpz_tdiv_r C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:348:2: call mpz_mul_2exp C value func(mpz_ptr, mpz_srcptr, long unsigned int) void gmp.go:356:2: call mpz_div_2exp C value func(mpz_ptr, mpz_srcptr, long unsigned int) void gmp.go:367:3: call mpz_pow_ui C value func(mpz_ptr, mpz_srcptr, long unsigned int) void gmp.go:369:3: call mpz_powm C value func(mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr) void gmp.go:378:2: call mpz_neg C value func(mpz_ptr, mpz_srcptr) void gmp.go:386:2: call mpz_abs C value func(mpz_ptr, mpz_srcptr) void gmp.go:404:9: call mpz_cmp C value func(mpz_srcptr, mpz_srcptr) int gmp.go:413:2: call mpz_tdiv_qr C value func(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void gmp.go:426:2: call mpz_gcdext C value func(mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void R=r DELTA=938 (628 added, 308 deleted, 2 changed) OCL=34733 CL=34791