Ignore:
Timestamp:
May 10, 2019, 2:46:27 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
04124c4
Parents:
b96d7c1
Message:

Unions now correctly use bitfields from previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/FunctionSpec.hpp

    rb96d7c1 r7f3f63c  
    3131
    3232        /// Bitflag type for storage classes
    33         union Specs {
    34                 unsigned int val;
    35                 struct {
    36                         bool is_inline   : 1;
    37                         bool is_noreturn : 1;
    38                         bool is_fortran  : 1;
     33        struct spec_flags {
     34                union {
     35                        unsigned int val;
     36                        struct {
     37                                bool is_inline   : 1;
     38                                bool is_noreturn : 1;
     39                                bool is_fortran  : 1;
     40                        };
     41
     42                        // MakeBitfieldPrint( NumSpecs )
    3943                };
    4044
    41                 MakeBitfield( Specs )
    42                 MakeBitfieldPrint( NumSpecs )
     45                constexpr spec_flags( unsigned int val ) : val(val) {}
    4346        };
    4447
     48        using Specs = bitfield<spec_flags>;
    4549}
    4650}
Note: See TracChangeset for help on using the changeset viewer.