Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary support for unions added. #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 13, 2016

  1. Configuration menu
    Copy the full SHA
    89642d9 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2016

  1. Adds support for initialization of unions

    Apart from a couple of obvious bug fixes, this focuses on initialization
    for unions. The previous initialization code had been designed with only struct
    and arrays in mind, so some pretty deep changes had to be made.
    
       * the data type `Initializer` now has three constructors for regular scalar
         initializers, aggregate initializers (arrays and structs), and union
         initializers. Might want to think about naming `Scalar` differently (see
         section 6.2.5 point 21).
       * `Initializer` is no longer a `Monoid`, since we can't make a `mempty`
         without knowing the type we are initializing. Instead, it is a `Semigroup`,
         with some combinations not valid. This means that either we will need
         to enforce `base >= 4.9` or `semigroups`.
    
    To the best of my current knowledge and testing, this accurately and completely
    implements initialization of unions as per C99.
    harpocrates committed Sep 17, 2016
    Configuration menu
    Copy the full SHA
    d7926d7 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2016

  1. Use IsIncomplete for union types too

    Add support for incomplete unions in the context of:
    
      * completing them
      * performing member access on them
      * zero initializing them
    
    Also added missing case in `Eq CType` for unions.
    harpocrates committed Sep 18, 2016
    Configuration menu
    Copy the full SHA
    498c5ad View commit details
    Browse the repository at this point in the history