aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/unsafe.cc
AgeCommit message (Collapse)AuthorFilesLines
2021-08-07compiler: support export/import of unsafe.Add/SliceIan Lance Taylor1-23/+41
For golang/go#19367 For golang/go#40481 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/340549
2021-08-02compiler, runtime: support unsafe.Add and unsafe.SliceIan Lance Taylor1-0/+16
For golang/go#19367 For golang/go#40481 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338949
2015-10-06compiler: Record each import as a distinct alias.Ian Lance Taylor1-2/+0
This patch introduces the Package_alias class which is a finer representation of the different between a package and the aliases it is imported under. Each alias keeps track of the location of its import statement and how many times that alias has been used. This allows the gofrontend to report when a specific import has not been used even if a symbol from the package has been used by another import. Fixes golang/go#12326. Reviewed-on: https://go-review.googlesource.com/14259 From-SVN: r228550
2015-01-30compiler: Fix -fgo-prefix handling.Ian Lance Taylor1-1/+1
There was bug in the fix for PR 61880: it only worked fully correctly for code compiled with -fgo-pkgpath. For code that used -fgo-prefix, or that used neither option, the '.' separating the prefix and the package name was converted to an underscore, which did not happen before. This broke SWIG and any other code that expected specific symbol names. Fortunately all code compiled in libgo and all code compiled by the go tool uses -fgo-pkgpath, so this probably did not affect very many people. This is an incomplete fix that does not modify the package file format, for use on both mainline and the GCC 4.9 branch. A follow on patch will fully fix the problem. From-SVN: r220268
2014-07-20compiler: Don't let dot-import names match names from previous files.Ian Lance Taylor1-3/+3
The test case for this will be bug488.go in the main repository: https://codereview.appspot.com/118000043 . From-SVN: r212871
2012-05-14libgo: Use -fgo-pkgpath.Ian Lance Taylor1-2/+2
From-SVN: r187485
2012-05-09compiler: Add -fgo-pkgpath option.Ian Lance Taylor1-1/+1
* lang.opt: Add -fgo-pkgpath. * go-lang.c (go_pkgpath): New static variable. (go_prefix): New static variable. (go_langhook_init): Pass go_pkgpath and go_prefix to go_create_gogo. (go_langhook_handle_option): Handle -fgo-pkgpath. Change -fgo-prefix handling to just set go_prefix. * go-c.h (go_set_prefix): Don't declare. (go_create_gogo): Add pkgpath and prefix to declaration. * go-gcc.cc (Gcc_backend::global_variable): Change unique_prefix to pkgpath. Don't include the package name in the asm name. * gccgo.texi (Invoking gccgo): Document -fgo-pkgpath. Update the docs for -fgo-prefix. From-SVN: r187356
2012-03-29compiler, libgo: unsafe.{Sizeof,Alignof,Offsetof} return uintptr.Ian Lance Taylor1-4/+4
From-SVN: r185946
2012-03-02libgo: Update to weekly.2012-02-14 release.Ian Lance Taylor1-54/+0
From-SVN: r184798
2012-02-17compiler: List imported packages in export information.Ian Lance Taylor1-0/+2
From-SVN: r184355
2012-01-20compiler: Handle recursive interfaces.Ian Lance Taylor1-1/+1
* go-gcc.cc (Gcc_backend::placeholder_struct_type): Permit name to be empty. (Gcc_backend::set_placeholder_struct_type): Likewise. From-SVN: r183340
2011-11-29compiler: Define and use backend-independent Location class.Sanjoy Das1-3/+4
From Sanjoy Das. * go-location.h: New file. * go-linemap.cc: New file. * go-gcc.cc: Change all uses of source_location to Location. * Make-lang.in (GO_OBJS): Add go/go-linemap.o. (GO_LINEMAP_H): New variable. (GO_LEX_H): Use $(GO_LINEMAP_H). (GO_GOGO_H, GO_TYPES_H, GO_IMPORT_H): Likewise. (go/go-linemap.o): New target. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r181813
2011-09-26Fix location of error about unused import "unsafe".Ian Lance Taylor1-0/+1
From-SVN: r179211
2011-04-21Define go_assert to replace gcc_assertIan Lance Taylor1-4/+4
This is defined in go-system.h in the backend. * go-system.h (go_assert, go_unreachable): Define. From-SVN: r172846
2011-02-22Don't crash import unsafe if "unsafe" was already defined.Ian Lance Taylor1-0/+7
From-SVN: r170389
2011-01-14Move clearing of flag_strict_aliasing to gcc interface.Ian Lance Taylor1-1/+6
From-SVN: r168774
2010-12-03Add Go frontend, libgo library, and Go testsuite.Ian Lance Taylor1-0/+134
gcc/: * gcc.c (default_compilers): Add entry for ".go". * common.opt: Add -static-libgo as a driver option. * doc/install.texi (Configuration): Mention libgo as an option for --enable-shared. Mention go as an option for --enable-languages. * doc/invoke.texi (Overall Options): Mention .go as a file name suffix. Mention go as a -x option. * doc/frontends.texi (G++ and GCC): Mention Go as a supported language. * doc/sourcebuild.texi (Top Level): Mention libgo. * doc/standards.texi (Standards): Add section on Go language. Move references for other languages into their own section. * doc/contrib.texi (Contributors): Mention that I contributed the Go frontend. gcc/testsuite/: * lib/go.exp: New file. * lib/go-dg.exp: New file. * lib/go-torture.exp: New file. * lib/target-supports.exp (check_compile): Match // Go. From-SVN: r167407