Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
0.5.0rc1 (#253)
Browse files Browse the repository at this point in the history
* deploy on tags
* only deploy on stable
* publish 0.5.0
  • Loading branch information
jyn514 authored Feb 7, 2020
1 parent fe7c337 commit 8dceb78
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,24 @@ jobs:
- tests/fuzz.sh
allow_failures:
- rust: nightly

before_deploy:
- cargo build --release

deploy:
- provider: releases
on:
tags: true
branch: master
condition: $TRAVIS_RUST_VERSION = stable
file: target/release/rcc
skip_cleanup: true
api_key:
secure: ioFdF6noWh8DuG5lIGCuMoAcTrum6gsqvDKe+9kjR+tRYnZ6J4cPJ16WUq4qWlp1AnrcB7HRwKuShg8Eu7PPojRKdxNA2fnblJHViNQa8gN3kyr1sfgCo6EEp0qL+eh9qNjx0O4nglMVPUFyg81fyhsX3B6UaQGYK6idxhYvM3e6DvZu5yE8o/FXn1vh9NfDP9RwwuZQTmPYitL2No07GEmeMhCbveXwpFqx9mq1sj51posEAsGFEf3wy+1GwZv0h3jGiYYsyWVLKDKPBRdImA784hnY9L5LqiZOUdpeULzogTNky510rzNI/Uy1vi/IMaTNoCUKo7BVjvtlga9a95Vwz7s7Xav5bUrMqMhwCbBp0WDyEJPkkWx14MzGyIOc2y2bx0PMrxS/tpl0Fzb+QJUai0J1LNBJQbs+B71I/E/Qq7kY5ytMYjboeA3IrqUT3takjEUuuZmMt+AOKN8rl9X81jMqCnVm9VVi+jDJuhhKUVwCfIVzFeVtv7/oQGBiZwTTF6pIk/dL50KUZg3gXjUTBo884+JZYaPC9GuEW/x+5fHHbObetvDQziIBCUABSNU+Votzgbk2CWoJLOUaSmZIYBac4LxnCDT9GZI6Y075uHhDXrzAgNTrUphKqwsK1aBQVy2+EeWrNB+5IKxWT60/ToWprHHx3aoLNGC7qDM=
- provider: cargo
on:
tags: true
branch: master
condition: $TRAVIS_RUST_VERSION = stable
token:
secure: Phpz1ZGy/HzDX9v/0GVv+ZDn6vZ5zxg51svj3tSZZjq5InZFJka14xG4cSCkzx/CI2knY8T0ATxHcr7zuTfAPpoa9LcSFg7PSHf/Zm44tseSOnrc20aENhc5Kn4UCqpARK9TcQvTMs8RvfD/TPhKvrYpFgWnRKhNJ0Tcb3Y4iXYAU0PjWNupvvkymt5KMDuDJnOFE/QV+9XpfV99dPijFfz2Gdn4YfV0uRH2a+MEhL7uD+iLikNd2CRBHhBqsQrmr76chwYspKe5/CKC1zLl9gwW4e8qGKYJxoA18m8fFgGTuDT+Xafy6RgE0WQ0GCnrHWuDm3MXWzAYv992yCKKFior9DvdNHQ1WFZXCim/IjgEMQ58E2FPCfkPd4BWOqA4qJ+w7tr2jyixbIVS1qnczoozO9x3c5FZrrZobAt082L1hdwj6H32ze0ckplo4Zk1CfipGz9CXiE2gQ+eRR3I/RcDjMvihnLnBNp69ul2xWTlj7/jxRwkoFBYFdNGG6N9JcXR3L5Xcs6ovVoZHCtz9x/WUb0igdzoWBpP+3/ISt2Wg7bjrpRe0rq8P1xhI8mpnYr+VloM7jHy8J8+rqr1PsIFOqAxm5vXlte7pfYJk44Fwa6g2Cus6ImfMUyzEoeWj4Y9kNb8rH3QXc2PmmQfGS45TBNdJApWPqbGxVidgPw=
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,52 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.5.0] - 2020-02-07

### Added

- This release contains the start of a preprocessor.
It is in very early stages and will crash on any inputs other than
`#if`, `#else`, `#ifdef`, and `#endif`. I recommend using your host preprocessor until this one is further along.

- Added an error limit. Instead of overwhelming you with dozens of errors in a file with a misplaced `{`, rcc will now report at most 10 errors in one run. This can be configured with `--max-errors n`, see `rcc --help` for more details.

- Added a recursion limit. Now, rcc will exit with an error instead of crashing on highly nested inputs (200+ parenthesis in a row).

### Changed

- Fold `char` expressions, such as `'1' - '0'`
- Display characters properly in error messages (e.g. '1' instead of 49)
- Various additional `CompileError`s have been added. This allows inspecting the type of an error dynamically instead of having to blindly display the string.
- The `Compile` API now takes an `Opt` struct instead of 4 different parameters. This should make it easier to add more options in the future.
- Use Graham's name in the 'authors' field instead of his username

### Fixed

This release fixed many bugs found by [honggzfuzz](https://github.com/rust-fuzz/honggfuzz-rs). Thank you to @Byter09 for helping me get it set up as well as lending me CPU time for the fuzz runs!

- Fix crash on nested functions (`int f() { int g() {} }`)
- Fix crash on assignments other than identifiers and pointers (e.g. `++A[1]`)
- Fix _many_ crashes in constant folding. A giant thank you to @pythondude325 for redesigning and implementing the new interpreter!
- Fix crash on `return` in a `do-while` loop
- Fix crash on `int f(void, void)`, and `int f(void, i)`
- Fix crash on using typedefs in an expression context (`typedef int i; int j = i;`)
- Fix crash on label in switch without braces
- Fix crash on `!void`
- Fix crash on `(int)void`
- Fix crash on invalid syntax in an `if` statement (`if (1) {} else else`)
- Fix crash on `!(_Bool)1)`
- Fix crash on using invalid structs in an expression
- Fix crash on signed overflow when incrementing the counter used for `enum` constants (e.g. `enum { A = -1u, B }`)
- Fix crash on invalid break after switch
- Fix crash on aggregate initializers with misleading braces (`int a[][3] = {1,2,3};`). `rcc` now properly initializes this as `int a[1][3] = {{1,2,3}};`.
- Fix crash on unterminated string at the end of a file

And the non-crash fixes:

- Don't allow taking the address of `register` variables
- Don't allow assigning to `const` variables
- Remove backslashes before newlines

## [0.4.0] - 2020-01-18

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rcc"
version = "0.4.0"
version = "0.5.0"
authors = ["Joshua Nelson <[email protected]>", "Graham Scheaffer <[email protected]>"]
edition = "2018"
description = "A C compiler written in Rust, with a focus on good error messages."
Expand Down

0 comments on commit 8dceb78

Please sign in to comment.