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
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
Andrew Kelley
d5bbd74871
allow C pointers to have alignment
...
clang/gcc support pointer alignment attribute:
https://clang.llvm.org/docs/AttributeReference.html#align-value
2019-02-14 20:04:13 -05:00
Andrew Kelley
cc7060d0d9
compile error for C pointer with align attribute
...
See #1059
2019-02-14 20:02:29 -05:00
Andrew Kelley
973a93d43b
add docs for C pointers
2019-02-14 19:03:04 -05:00
Andrew Kelley
df87044fd6
omit nonnull attribute for C pointers
...
See #1059
2019-02-14 16:10:12 -05:00
Andrew Kelley
6769183a9d
fix implicit cast error unions with non-optional to optional pointer
...
and update self hosted compiler for C pointers
See #1059
2019-02-14 15:48:28 -05:00
Andrew Kelley
52c03de5c2
add missing compile error for OpaqueType inside structs/unions
...
closes #1862
2019-02-14 13:07:51 -05:00
Andrew Kelley
e03c770145
compile error tests for implicit C pointer casting
...
See #1059
2019-02-14 12:28:50 -05:00
Andrew Kelley
c58b802034
remove the "top of the comptime stack" compile error
...
It's still best practice to put `@setEvalBranchQuota` at the top of
the comptime stack, but as Jimmi notes in #1949 , when a function
can be called at comptime and also can be the top of the comptime stack,
this compile error is fundamentally unsound.
So now it's gone.
closes #1949
2019-02-14 10:51:59 -05:00
Andrew Kelley
a4e32d9fb1
ci: freebsd: remove '.git' from URL as per upstream suggestion
...
https://todo.sr.ht/~sircmpwn/dispatch.sr.ht/24#comment-1465
2019-02-14 09:46:08 -05:00
Andrew Kelley
59de24817e
runtime safety check for casting null to pointer
...
see #1059
2019-02-14 01:09:33 -05:00
Andrew Kelley
d4d2718bca
comptime detection of casting null to pointer
...
See #1059
2019-02-14 00:40:39 -05:00
Jimmi Holst Christensen
2911eb34de
Added error for nesting vectors
2019-02-13 12:19:08 +01:00
Marc Tiehuis
de7c55145a
Add parseFloat support to json.zig
2019-02-14 00:12:00 +13:00
Marc Tiehuis
c34ce6878e
Add parseFloat to std.fmt
...
This is not intended to be the long-term implementation as it doesn't
provide various properties that we eventually will want (e.g.
round-tripping, denormal support). It also uses f64 internally so the
wider f128 will be inaccurate.
2019-02-14 00:07:51 +13:00