Changeset 92d8cda for src


Ignore:
Timestamp:
Sep 6, 2023, 11:49:02 AM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
4a40fca7, 79b05224, 9d47c1f
Parents:
1f10959 (diff), 1fc111c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ResolveTypeof.cc

    r1f10959 r92d8cda  
    253253                            const ast::ObjectDecl * mem = baseEnum->members.at(m).as<const ast::ObjectDecl>();
    254254                            assert(mem);
    255                             if ( mem->init ) {
    256                                 const ast::SingleInit * memInit = mem->init.as<const ast::SingleInit>();
    257                                 ast::Expr * initValue = shallowCopy( memInit->value.get() );
    258                                 newDesination->designators.push_back( initValue );
    259                             } else {
    260                                 SemanticError(des->location, "TODO: Enum Array Designation with no explicit value is not implemented");
    261                             }
     255                            const ast::ConstantExpr * enumAsInit = ast::ConstantExpr::from_int(newDesination->location, m);
     256                            newDesination->designators.push_back( enumAsInit );
    262257                        }
    263258                    }
Note: See TracChangeset for help on using the changeset viewer.