Ignore:
Timestamp:
Sep 1, 2017, 6:59:48 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
b0dfbc4
Parents:
bc3127d
Message:

Fix handling of GCC label address and computed goto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rbc3127d r5809461  
    2424#include "Constant.h"             // for Constant
    2525#include "Initializer.h"          // for Designation (ptr only), Initializer
     26#include "Label.h"                // for Label
    2627#include "Mutator.h"              // for Mutator
    2728#include "SynTree.h"              // for UniqueId
     
    173174};
    174175
    175 // xxx - this doesn't appear to actually be hooked in anywhere. We should use this instead of the "&&"" UntypedExpr hack
     176// GCC &&label
     177// https://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/Labels-as-Values.html
    176178class LabelAddressExpr : public Expression {
    177179  public:
    178         Expression * arg;
    179 
    180         LabelAddressExpr( Expression * arg );
     180        Label arg;
     181
     182        LabelAddressExpr( const Label &arg );
    181183        LabelAddressExpr( const LabelAddressExpr & other );
    182184        virtual ~LabelAddressExpr();
    183 
    184         Expression * get_arg() const { return arg; }
    185         void set_arg(Expression * newValue ) { arg = newValue; }
    186185
    187186        virtual LabelAddressExpr * clone() const { return new LabelAddressExpr( * this ); }
Note: See TracChangeset for help on using the changeset viewer.