Andrew Kelley
b0ceea1831
zig fmt: fix infix operator before multiline string literal
2019-02-18 18:11:12 -05:00
kristopher tate
74bdc1d1f8
src/analyze.cpp: default to using param_node
upon callconv error;
2019-02-18 17:57:24 -05:00
John Schmidt
99adda9df5
Some function doc tweaks ( #1961 )
...
* Add docs for the inline function attribute
* Remove outdated comment
Seems like a leftover from when implicit returns were around.
* Consistent terminology
2019-02-18 17:53:41 -05:00
Andrew Kelley
043090020f
docs: shadowing
...
closes #1245
2019-02-18 17:49:26 -05:00
Andrew Kelley
8922008dec
docs: note top level declarations are order-independent
...
closes #1244
2019-02-18 17:41:55 -05:00
Andrew Kelley
28bf768883
export _mh_execute_header with weak linkage
...
* also fix extern variables with initialiaztion values to generate runtime code
* remove the workaround in example/shared_library/mathtest.zig
* introduce the ability for global variables to have Weak and LinkOnce
linkage
* fix `@export` to work for non-functions. this code needs to be
audited though.
* fix comptime ptrcast not keeping bigger alignment
* fix linker warnings when targeting darwin
closes #1903
2019-02-18 16:47:30 -05:00
Andrew Kelley
74a335c4cc
Merge branch 'emekoi-fix-1711'
2019-02-18 13:12:03 -05:00
Andrew Kelley
7a84fe79b9
pull request fixups
2019-02-18 13:05:26 -05:00
emekoi
9b3013d2f6
make @enumToInt work on union(enum)
...
closes #1711
2019-02-18 11:43:45 -05:00
Jimmi HC
d2fb95af88
Fixed std.testing.expectEqual
2019-02-18 17:22:14 +01:00
LemonBoy
e280dce30f
Translate parameterless C functions ( #1978 )
...
Both FunctionNoProto and FunctionProto are subclasses of FunctionType,
the only difference is that the former is parameterless.
2019-02-18 10:26:45 -05:00
LemonBoy
7d762648a4
Add align attribute for params pointers
2019-02-18 09:52:18 -05:00
Andrew Kelley
74d9593d85
README: add NetBSD to support table
2019-02-18 00:13:18 -05:00
Andrew Kelley
3e586264e5
Merge pull request #1972 from coypoop/netbsd
...
Add NetBSD support
2019-02-18 00:10:31 -05:00
Andrew Kelley
39207fa1d4
Merge pull request #1963 from matthew-mcallister/dedup-compile-log-warning
...
Deduplicate compile log statement warnings
2019-02-17 23:53:43 -05:00
Quetzal Bradley
7e54954052
fix openWriteNoClobber and add test
2019-02-17 23:21:45 -05:00
Matthew McAllister
c70ee9177e
Check for duped error messages in compile tests
2019-02-17 15:33:28 -08:00
Matthew McAllister
51783510b9
Deduplicate compile log statement warnings
2019-02-17 14:02:37 -08:00
Maya Rashish
b93405c24b
Don't provide a bogus definition of EVFILT_USER
2019-02-17 23:50:30 +02:00
Andrew Kelley
de18ece294
Merge pull request #1975 from BenoitJGirard/master
...
Fix std.math.powi so powi(x, +-0) = 1 for any x.
2019-02-17 15:00:17 -05:00
Benoit Jauvin-Girard
fcf65f06c4
Fix std.math.powi so powi(x, +-0) = 1 for any x.
2019-02-17 14:52:40 -05:00
LemonBoy
6cf38369d2
Silence gcc8 class-memaccess warnings
...
Use an explicit cast to tell gcc we know what we're doing.
2019-02-17 14:40:01 -05:00
BenoitJGirard
6daa041932
Merge pull request #2 from ziglang/master
...
Refreshing fork.
2019-02-17 14:38:55 -05:00
Maya Rashish
2878efee86
Undo local, unneeded patch
2019-02-17 14:14:17 +02:00
Maya Rashish
8d2a902945
freebsd: fix pointer cast in mmap
2019-02-17 02:25:37 -05:00
Maya Rashish
bc10382ec1
Add NetBSD support
...
Mostly picking the same paths as FreeBSD.
We need a little special handling for crt files, as netbsd uses its
own (and not GCC's) for those, with slightly different names.
2019-02-17 09:17:34 +02:00
Andrew Kelley
db9c1b0528
Merge branch 'sjdh02-master'
2019-02-17 00:33:43 -05:00
Andrew Kelley
4a0bb62584
fixups
2019-02-17 00:29:58 -05:00
sjdh02
fd61a084e4
fix BufferedInStream not reading delayed input
2019-02-16 21:19:49 -06:00
Matthew McAllister
91989e70ba
Fix lvalue dereference type checking
...
Previously, if a dereference instruction was an lvalue, it would fail to
typecheck that the value being dereferenced was indeed a pointer.
Although a little clunky, this change obviates the need for redundant
type checks scattered about the analysis.
2019-02-16 17:37:47 -08:00
Andrew Kelley
c3c92ca8b1
translate-c: 4 more functions using C decls
...
See #1964
2019-02-16 19:48:39 -05:00
Andrew Kelley
2dfa76a1a7
fix regressions from previous commit when building with clang
2019-02-16 16:17:30 -05:00
Andrew Kelley
356cfa08f4
translate-c: proof of concept for transitioning to userland
...
See #1964
2019-02-16 15:26:44 -05:00
Andrew Kelley
bd52d81dc3
README: direct link to Download & Documentation at the top
2019-02-16 14:36:52 -05:00
Andrew Kelley
f4c5bcfea5
refactor translate-c - no more using namespace clang
...
this is in preparation for #1964
2019-02-16 14:09:00 -05:00
Andrew Kelley
f57182456d
Merge pull request #1898 from Sahnvour/translate-c-arrays
...
Translate c arrays
2019-02-16 14:07:41 -05:00
Andrew Kelley
a97362e677
fmt_runner: remove redundant check
2019-02-16 12:24:02 -05:00
Andrew Kelley
ba56f365c8
bring zig fmt to stage1
2019-02-16 00:53:32 -05:00
Marc Tiehuis
77a4e7b374
Merge pull request #1958 from ziglang/parse-float
...
Add float parsing support to std
2019-02-16 15:04:37 +13:00
emekoi
5736a9c6a9
removed hidden union tag in release modes
2019-02-15 20:02:09 -05:00
Andrew Kelley
a05e224150
typecheck the panic function
...
this adds the prototype of panic to @import("builtin")
and then uses it to do an implicit cast of the panic
function to this prototype, rather than redoing all the
implicit cast logic.
closes #1894
closes #1895
2019-02-15 19:19:28 -05:00
Andrew Kelley
7293e012d7
breaking: fix @sizeOf to be alloc size rather than store size
...
* Fixes breaches of the guarantee that `@sizeOf(T) >= @alignOf(T)`
* Fixes std.mem.secureZero for integers where this guarantee previously
was breached
* Fixes std.mem.Allocator for integers where this guarantee previously
was breached
Closes #1851
Closes #1864
2019-02-15 18:05:50 -05:00
Andrew Kelley
567c9b688e
Merge pull request #1965 from ziglang/c-pointer-type
...
implement C pointers
2019-02-15 02:20:42 -05:00
Andrew Kelley
ee5e196f88
add test for truncate on comptime integers
...
closes #703
2019-02-15 02:02:19 -05:00
Andrew Kelley
99b19adeb3
stage2: fix windows regressions
2019-02-14 23:46:53 -05:00
Andrew Kelley
71d7100aa8
darwin: fix pointer cast in mmap
2019-02-14 23:38:14 -05:00
Marc Tiehuis
170ec504ec
Use official llvm mirror for compiler-rt commit ref
2019-02-15 17:37:55 +13:00
Marc Tiehuis
18ad50970f
Make parseFloat stricter in what it accepts as input
2019-02-15 17:32:13 +13:00
Andrew Kelley
e025c70166
stage2: fix llvm.zig with opaque types back to single-item pointer
2019-02-14 23:17:11 -05:00
Andrew Kelley
d6e0d82c32
translate-c: back to *c_void for opaque types
...
See #1059
2019-02-14 23:09:31 -05:00