Changes in / [a4248de1:04e367c]


Ignore:
Location:
src
Files:
6 added
16 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    ra4248de1 r04e367c  
    2727namespace CodeGen {
    2828        struct GenType : public WithVisitorRef<GenType>, public WithShortCircuiting {
    29                 GenType( const std::string &typeString, bool pretty = false, bool genC = false, bool lineMarks = false );
    30                 std::string get_typeString() const { return typeString; }
    31                 void set_typeString( const std::string &newValue ) { typeString = newValue; }
     29                std::string typeString;
     30                GenType( const std::string &typeString, bool pretty, bool genC, bool lineMarks );
    3231
    3332                void previsit( BaseSyntaxNode * );
     
    5857                void genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic );
    5958
    60                 std::string typeString;
    61                 bool pretty = false; // pretty print
    62                 bool genC = false;   // generating C code?
    63                 bool lineMarks = false;
     59                bool pretty = false;    // pretty print
     60                bool genC = false;      // generating C code?
     61                bool lineMarks = false; // lineMarks on for CodeGenerator?
    6462        };
    6563
     
    7472
    7573                type->accept( gt );
    76                 return os.str() + gt.pass.get_typeString();
     74                return os.str() + gt.pass.typeString;
    7775        }
    7876
  • src/Common/SemanticError.h

    ra4248de1 r04e367c  
    5858        {"aggregate-forward-decl" , "forward declaration of nested aggregate: %s"  , Severity::Warn},
    5959        {"superfluous-decl"       , "declaration does not allocate storage: %s"    , Severity::Warn},
     60        {"gcc-attributes"         , "invalid attribute: %s"                        , Severity::Warn},
    6061};
    6162
     
    6667        AggrForwardDecl,
    6768        SuperfluousDecl,
     69        GccAttributes,
    6870        NUMBER_OF_WARNINGS, // This MUST be the last warning
    6971};
  • src/Common/module.mk

    ra4248de1 r04e367c  
    1919       Common/DebugMalloc.cc \
    2020       Common/Assert.cc \
    21        Common/Heap.cc
     21       Common/Heap.cc \
     22       Common/Eval.cc
  • src/Common/utility.h

    ra4248de1 r04e367c  
    3131#include "Common/Indenter.h"
    3232
     33class Expression;
     34
    3335template< typename T >
    3436static inline T * maybeClone( const T *orig ) {
     
    456458} // ilog2
    457459
     460// -----------------------------------------------------------------------------
     461/// evaluates expr as a long long int. If second is false, expr could not be evaluated
     462std::pair<long long int, bool> eval(Expression * expr);
    458463
    459464// Local Variables: //
  • src/InitTweak/FixGlobalInit.cc

    ra4248de1 r04e367c  
    3737        class GlobalFixer : public WithShortCircuiting {
    3838          public:
    39                 GlobalFixer( const std::string & name, bool inLibrary );
     39                GlobalFixer( bool inLibrary );
    4040
    4141                void previsit( ObjectDecl *objDecl );
     
    5252        };
    5353
    54         void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary ) {
    55                 PassVisitor<GlobalFixer> visitor( name, inLibrary );
     54        void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary ) {
     55                PassVisitor<GlobalFixer> visitor( inLibrary );
    5656                acceptAll( translationUnit, visitor );
    5757                GlobalFixer & fixer = visitor.pass;
     
    7070        }
    7171
    72   std::string globalFunctionName( const std::string & name ) {
    73         // get basename
    74         std::string ret = name.substr( 0, name.find( '.' ) );
    75         // replace invalid characters with _
    76                 static std::string invalid = "/-@";
    77         replace_if( ret.begin(), ret.end(), []( char c ) { return invalid.find(c) != std::string::npos; }, '_' );
    78         return ret;
    79   }
    80 
    81         GlobalFixer::GlobalFixer( const std::string & name, bool inLibrary ) : tempNamer( "_global_init" ) {
    82                 std::string fixedName = globalFunctionName( name );
     72        GlobalFixer::GlobalFixer( bool inLibrary ) : tempNamer( "_global_init" ) {
    8373                std::list< Expression * > ctorParameters;
    8474                std::list< Expression * > dtorParameters;
     
    9080                        // for library code are run before constructors and destructors for user code,
    9181                        // specify a priority when building the library. Priorities 0-100 are reserved by gcc.
    92                         ctorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
    93                         dtorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
     82                        // Priorities 101-200 are reserved by cfa, so use priority 200 for CFA library globals,
     83                        // allowing room for overriding with a higher priority.
     84                        ctorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
     85                        dtorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
    9486                }
    95                 initFunction = new FunctionDecl( "_init_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
     87                initFunction = new FunctionDecl( "__global_init__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
    9688                initFunction->get_attributes().push_back( new Attribute( "constructor", ctorParameters ) );
    97                 destroyFunction = new FunctionDecl( "_destroy_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
     89                destroyFunction = new FunctionDecl( "__global_destroy__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
    9890                destroyFunction->get_attributes().push_back( new Attribute( "destructor", dtorParameters ) );
    9991        }
     
    110102                if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
    111103                        // a decision should have been made by the resolver, so ctor and init are not both non-NULL
    112                         assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
     104                        assert( ! ctorInit->ctor || ! ctorInit->init );
    113105
    114                         Statement * dtor = ctorInit->get_dtor();
     106                        Statement * dtor = ctorInit->dtor;
    115107                        if ( dtor && ! isIntrinsicSingleArgCallStmt( dtor ) ) {
    116108                                // don't need to call intrinsic dtor, because it does nothing, but
    117109                                // non-intrinsic dtors must be called
    118110                                destroyStatements.push_front( dtor );
    119                                 ctorInit->set_dtor( NULL );
     111                                ctorInit->dtor = nullptr;
    120112                        } // if
    121                         if ( Statement * ctor = ctorInit->get_ctor() ) {
     113                        if ( Statement * ctor = ctorInit->ctor ) {
    122114                                initStatements.push_back( ctor );
    123                                 objDecl->set_init( NULL );
    124                                 ctorInit->set_ctor( NULL );
    125                         } else if ( Initializer * init = ctorInit->get_init() ) {
    126                                 objDecl->set_init( init );
    127                                 ctorInit->set_init( NULL );
     115                                objDecl->init = nullptr;
     116                                ctorInit->ctor = nullptr;
     117                        } else if ( Initializer * init = ctorInit->init ) {
     118                                objDecl->init = init;
     119                                ctorInit->init = nullptr;
    128120                        } else {
    129121                                // no constructor and no initializer, which is okay
    130                                 objDecl->set_init( NULL );
     122                                objDecl->init = nullptr;
    131123                        } // if
    132124                        delete ctorInit;
  • src/InitTweak/FixGlobalInit.h

    ra4248de1 r04e367c  
    2222
    2323namespace InitTweak {
    24   /// Moves global initialization into an _init function that is unique to the translation unit.
    25   /// Sets the priority of the initialization function depending on whether the initialization
    26   /// function is for library code.
    27   void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
    28 
    29   /// Apply transformations to a file name to get a valid C identifier which will be used as
    30   /// the name of the generated initializer function.
    31   std::string globalFunctionName( const std::string & name );
     24        /// Moves global initialization into an _init function that is unique to the translation unit.
     25        /// Sets the priority of the initialization function depending on whether the initialization
     26        /// function is for library code.
     27        void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary );
    3228} // namespace
    3329
  • src/InitTweak/FixInit.cc

    ra4248de1 r04e367c  
    238238        } // namespace
    239239
    240         void fix( std::list< Declaration * > & translationUnit, const std::string & filename, bool inLibrary ) {
     240        void fix( std::list< Declaration * > & translationUnit, bool inLibrary ) {
    241241                PassVisitor<SelfAssignChecker> checker;
    242242                acceptAll( translationUnit, checker );
    243243
    244244                // fixes ConstructorInit for global variables. should happen before fixInitializers.
    245                 InitTweak::fixGlobalInit( translationUnit, filename, inLibrary );
     245                InitTweak::fixGlobalInit( translationUnit, inLibrary );
    246246
    247247                UnqCount unqCount;
  • src/InitTweak/FixInit.h

    ra4248de1 r04e367c  
    2424  /// replace constructor initializers with expression statements
    2525  /// and unwrap basic C-style initializers
    26         void fix( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
     26        void fix( std::list< Declaration * > & translationUnit, bool inLibrary );
    2727} // namespace
    2828
  • src/InitTweak/InitTweak.cc

    ra4248de1 r04e367c  
    408408                return allofCtorDtor( stmt, []( Expression * callExpr ){
    409409                        if ( ApplicationExpr * appExpr = isIntrinsicCallExpr( callExpr ) ) {
    410                                 FunctionType *funcType = GenPoly::getFunctionType( appExpr->get_function()->get_result() );
     410                                FunctionType *funcType = GenPoly::getFunctionType( appExpr->function->result );
    411411                                assert( funcType );
    412412                                return funcType->get_parameters().size() == 1;
  • src/Makefile.am

    ra4248de1 r04e367c  
    1919
    2020SRC = main.cc \
    21       MakeLibCfa.cc
     21      MakeLibCfa.cc \
     22      CompilationState.cc
    2223
    2324MAINTAINERCLEANFILES =
     
    3738include SynTree/module.mk
    3839include Tuples/module.mk
     40include Validate/module.mk
    3941include Virtual/module.mk
    4042
  • src/Makefile.in

    ra4248de1 r04e367c  
    2323#SRC +=  ArgTweak/Rewriter.cc \
    2424#       ArgTweak/Mutate.cc
     25
     26######################### -*- Mode: Makefile-Gmake -*- ########################
     27###############################################################################
    2528
    2629######################### -*- Mode: Makefile-Gmake -*- ########################
     
    150153am__objects_1 = driver_cfa_cpp-main.$(OBJEXT) \
    151154        driver_cfa_cpp-MakeLibCfa.$(OBJEXT) \
     155        driver_cfa_cpp-CompilationState.$(OBJEXT) \
    152156        CodeGen/driver_cfa_cpp-Generate.$(OBJEXT) \
    153157        CodeGen/driver_cfa_cpp-CodeGenerator.$(OBJEXT) \
     
    165169        Common/driver_cfa_cpp-Assert.$(OBJEXT) \
    166170        Common/driver_cfa_cpp-Heap.$(OBJEXT) \
     171        Common/driver_cfa_cpp-Eval.$(OBJEXT) \
    167172        ControlStruct/driver_cfa_cpp-LabelGenerator.$(OBJEXT) \
    168173        ControlStruct/driver_cfa_cpp-LabelFixer.$(OBJEXT) \
     
    254259        Tuples/driver_cfa_cpp-TupleExpansion.$(OBJEXT) \
    255260        Tuples/driver_cfa_cpp-Explode.$(OBJEXT) \
     261        Validate/driver_cfa_cpp-HandleAttributes.$(OBJEXT) \
    256262        Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT)
    257263am_driver_cfa_cpp_OBJECTS = $(am__objects_1)
     
    352358        $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk \
    353359        $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk \
    354         $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk \
    355         $(top_srcdir)/automake/depcomp $(top_srcdir)/automake/ylwrap \
    356         Parser/lex.cc Parser/parser.cc Parser/parser.hh
     360        $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk \
     361        $(srcdir)/Virtual/module.mk $(top_srcdir)/automake/depcomp \
     362        $(top_srcdir)/automake/ylwrap Parser/lex.cc Parser/parser.cc \
     363        Parser/parser.hh
    357364DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    358365ACLOCAL = @ACLOCAL@
     
    478485# create object files in directory with source files
    479486AUTOMAKE_OPTIONS = subdir-objects
    480 SRC = main.cc MakeLibCfa.cc CodeGen/Generate.cc \
     487SRC = main.cc MakeLibCfa.cc CompilationState.cc CodeGen/Generate.cc \
    481488        CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
    482489        CodeGen/FixNames.cc CodeGen/FixMain.cc \
     
    485492        Concurrency/Waitfor.cc Common/SemanticError.cc \
    486493        Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \
    487         Common/Heap.cc ControlStruct/LabelGenerator.cc \
     494        Common/Heap.cc Common/Eval.cc ControlStruct/LabelGenerator.cc \
    488495        ControlStruct/LabelFixer.cc ControlStruct/MLEMutator.cc \
    489496        ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \
     
    527534        SynTree/Attribute.cc SynTree/DeclReplacer.cc \
    528535        Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
    529         Tuples/Explode.cc Virtual/ExpandCasts.cc
     536        Tuples/Explode.cc Validate/HandleAttributes.cc \
     537        Virtual/ExpandCasts.cc
    530538MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \
    531539        ${cfa_cpplib_PROGRAMS}}
     
    546554.SUFFIXES:
    547555.SUFFIXES: .cc .ll .o .obj .yy
    548 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
     556$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
    549557        @for dep in $?; do \
    550558          case '$(am__configure_deps)' in \
     
    566574            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    567575        esac;
    568 $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__empty):
     576$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__empty):
    569577
    570578$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    673681        Common/$(DEPDIR)/$(am__dirstamp)
    674682Common/driver_cfa_cpp-Heap.$(OBJEXT): Common/$(am__dirstamp) \
     683        Common/$(DEPDIR)/$(am__dirstamp)
     684Common/driver_cfa_cpp-Eval.$(OBJEXT): Common/$(am__dirstamp) \
    675685        Common/$(DEPDIR)/$(am__dirstamp)
    676686ControlStruct/$(am__dirstamp):
     
    927937Tuples/driver_cfa_cpp-Explode.$(OBJEXT): Tuples/$(am__dirstamp) \
    928938        Tuples/$(DEPDIR)/$(am__dirstamp)
     939Validate/$(am__dirstamp):
     940        @$(MKDIR_P) Validate
     941        @: > Validate/$(am__dirstamp)
     942Validate/$(DEPDIR)/$(am__dirstamp):
     943        @$(MKDIR_P) Validate/$(DEPDIR)
     944        @: > Validate/$(DEPDIR)/$(am__dirstamp)
     945Validate/driver_cfa_cpp-HandleAttributes.$(OBJEXT):  \
     946        Validate/$(am__dirstamp) Validate/$(DEPDIR)/$(am__dirstamp)
    929947Virtual/$(am__dirstamp):
    930948        @$(MKDIR_P) Virtual
     
    957975        -rm -f SynTree/*.$(OBJEXT)
    958976        -rm -f Tuples/*.$(OBJEXT)
     977        -rm -f Validate/*.$(OBJEXT)
    959978        -rm -f Virtual/*.$(OBJEXT)
    960979
     
    962981        -rm -f *.tab.c
    963982
     983@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-CompilationState.Po@am__quote@
    964984@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-MakeLibCfa.Po@am__quote@
    965985@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-main.Po@am__quote@
     
    974994@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@
    975995@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@
     996@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po@am__quote@
    976997@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Heap.Po@am__quote@
    977998@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Po@am__quote@
     
    10681089@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@
    10691090@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleExpansion.Po@am__quote@
     1091@AMDEP_TRUE@@am__include@ @am__quote@Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po@am__quote@
    10701092@AMDEP_TRUE@@am__include@ @am__quote@Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po@am__quote@
    10711093
     
    11141136@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-MakeLibCfa.obj `if test -f 'MakeLibCfa.cc'; then $(CYGPATH_W) 'MakeLibCfa.cc'; else $(CYGPATH_W) '$(srcdir)/MakeLibCfa.cc'; fi`
    11151137
     1138driver_cfa_cpp-CompilationState.o: CompilationState.cc
     1139@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT driver_cfa_cpp-CompilationState.o -MD -MP -MF $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo -c -o driver_cfa_cpp-CompilationState.o `test -f 'CompilationState.cc' || echo '$(srcdir)/'`CompilationState.cc
     1140@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo $(DEPDIR)/driver_cfa_cpp-CompilationState.Po
     1141@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='CompilationState.cc' object='driver_cfa_cpp-CompilationState.o' libtool=no @AMDEPBACKSLASH@
     1142@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1143@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-CompilationState.o `test -f 'CompilationState.cc' || echo '$(srcdir)/'`CompilationState.cc
     1144
     1145driver_cfa_cpp-CompilationState.obj: CompilationState.cc
     1146@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT driver_cfa_cpp-CompilationState.obj -MD -MP -MF $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo -c -o driver_cfa_cpp-CompilationState.obj `if test -f 'CompilationState.cc'; then $(CYGPATH_W) 'CompilationState.cc'; else $(CYGPATH_W) '$(srcdir)/CompilationState.cc'; fi`
     1147@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo $(DEPDIR)/driver_cfa_cpp-CompilationState.Po
     1148@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='CompilationState.cc' object='driver_cfa_cpp-CompilationState.obj' libtool=no @AMDEPBACKSLASH@
     1149@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1150@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-CompilationState.obj `if test -f 'CompilationState.cc'; then $(CYGPATH_W) 'CompilationState.cc'; else $(CYGPATH_W) '$(srcdir)/CompilationState.cc'; fi`
     1151
    11161152CodeGen/driver_cfa_cpp-Generate.o: CodeGen/Generate.cc
    11171153@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/driver_cfa_cpp-Generate.o -MD -MP -MF CodeGen/$(DEPDIR)/driver_cfa_cpp-Generate.Tpo -c -o CodeGen/driver_cfa_cpp-Generate.o `test -f 'CodeGen/Generate.cc' || echo '$(srcdir)/'`CodeGen/Generate.cc
     
    13241360@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Heap.obj `if test -f 'Common/Heap.cc'; then $(CYGPATH_W) 'Common/Heap.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Heap.cc'; fi`
    13251361
     1362Common/driver_cfa_cpp-Eval.o: Common/Eval.cc
     1363@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Eval.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo -c -o Common/driver_cfa_cpp-Eval.o `test -f 'Common/Eval.cc' || echo '$(srcdir)/'`Common/Eval.cc
     1364@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po
     1365@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Common/Eval.cc' object='Common/driver_cfa_cpp-Eval.o' libtool=no @AMDEPBACKSLASH@
     1366@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1367@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Eval.o `test -f 'Common/Eval.cc' || echo '$(srcdir)/'`Common/Eval.cc
     1368
     1369Common/driver_cfa_cpp-Eval.obj: Common/Eval.cc
     1370@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Eval.obj -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo -c -o Common/driver_cfa_cpp-Eval.obj `if test -f 'Common/Eval.cc'; then $(CYGPATH_W) 'Common/Eval.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Eval.cc'; fi`
     1371@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po
     1372@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Common/Eval.cc' object='Common/driver_cfa_cpp-Eval.obj' libtool=no @AMDEPBACKSLASH@
     1373@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1374@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Eval.obj `if test -f 'Common/Eval.cc'; then $(CYGPATH_W) 'Common/Eval.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Eval.cc'; fi`
     1375
    13261376ControlStruct/driver_cfa_cpp-LabelGenerator.o: ControlStruct/LabelGenerator.cc
    13271377@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-LabelGenerator.o -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-LabelGenerator.Tpo -c -o ControlStruct/driver_cfa_cpp-LabelGenerator.o `test -f 'ControlStruct/LabelGenerator.cc' || echo '$(srcdir)/'`ControlStruct/LabelGenerator.cc
     
    25692619@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    25702620@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Tuples/driver_cfa_cpp-Explode.obj `if test -f 'Tuples/Explode.cc'; then $(CYGPATH_W) 'Tuples/Explode.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/Explode.cc'; fi`
     2621
     2622Validate/driver_cfa_cpp-HandleAttributes.o: Validate/HandleAttributes.cc
     2623@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Validate/driver_cfa_cpp-HandleAttributes.o -MD -MP -MF Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo -c -o Validate/driver_cfa_cpp-HandleAttributes.o `test -f 'Validate/HandleAttributes.cc' || echo '$(srcdir)/'`Validate/HandleAttributes.cc
     2624@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po
     2625@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Validate/HandleAttributes.cc' object='Validate/driver_cfa_cpp-HandleAttributes.o' libtool=no @AMDEPBACKSLASH@
     2626@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2627@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Validate/driver_cfa_cpp-HandleAttributes.o `test -f 'Validate/HandleAttributes.cc' || echo '$(srcdir)/'`Validate/HandleAttributes.cc
     2628
     2629Validate/driver_cfa_cpp-HandleAttributes.obj: Validate/HandleAttributes.cc
     2630@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Validate/driver_cfa_cpp-HandleAttributes.obj -MD -MP -MF Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo -c -o Validate/driver_cfa_cpp-HandleAttributes.obj `if test -f 'Validate/HandleAttributes.cc'; then $(CYGPATH_W) 'Validate/HandleAttributes.cc'; else $(CYGPATH_W) '$(srcdir)/Validate/HandleAttributes.cc'; fi`
     2631@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po
     2632@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Validate/HandleAttributes.cc' object='Validate/driver_cfa_cpp-HandleAttributes.obj' libtool=no @AMDEPBACKSLASH@
     2633@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2634@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Validate/driver_cfa_cpp-HandleAttributes.obj `if test -f 'Validate/HandleAttributes.cc'; then $(CYGPATH_W) 'Validate/HandleAttributes.cc'; else $(CYGPATH_W) '$(srcdir)/Validate/HandleAttributes.cc'; fi`
    25712635
    25722636Virtual/driver_cfa_cpp-ExpandCasts.o: Virtual/ExpandCasts.cc
     
    27312795        -rm -f Tuples/$(DEPDIR)/$(am__dirstamp)
    27322796        -rm -f Tuples/$(am__dirstamp)
     2797        -rm -f Validate/$(DEPDIR)/$(am__dirstamp)
     2798        -rm -f Validate/$(am__dirstamp)
    27332799        -rm -f Virtual/$(DEPDIR)/$(am__dirstamp)
    27342800        -rm -f Virtual/$(am__dirstamp)
     
    27482814
    27492815distclean: distclean-am
    2750         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
     2816        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
    27512817        -rm -f Makefile
    27522818distclean-am: clean-am distclean-compile distclean-generic \
     
    27942860
    27952861maintainer-clean: maintainer-clean-am
    2796         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
     2862        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
    27972863        -rm -f Makefile
    27982864maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/ResolvExpr/CurrentObject.cc

    ra4248de1 r04e367c  
    139139                ArrayIterator( ArrayType * at ) : array( at ) {
    140140                        PRINT( std::cerr << "Creating array iterator: " << at << std::endl; )
    141                         base = at->get_base();
     141                        base = at->base;
    142142                        memberIter = createMemberIterator( base );
    143                         if ( at->isVarLen ) SemanticError( at, "VLA initialization does not support @=" );
    144                         setSize( at->get_dimension() );
     143                        if ( at->isVarLen ) SemanticError( at, "VLA initialization does not support @=: " );
     144                        setSize( at->dimension );
    145145                }
    146146
     
    150150
    151151        private:
    152                 void setSize( Expression * expr ) {
    153                         if ( ConstantExpr * constExpr = dynamic_cast< ConstantExpr * >( expr ) ) {
    154                                 try {
    155                                         size = constExpr->intValue();
    156                                         PRINT( std::cerr << "array type with size: " << size << std::endl; )
    157                                 } catch ( SemanticErrorException & ) {
    158                                         SemanticError( expr, "Constant expression of non-integral type in array dimension: " );
    159                                 }
    160                         }       else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
    161                                 setSize( castExpr->get_arg() ); // xxx - need to perform the conversion specified by the cast
    162                         } else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
    163                                 if ( EnumInstType * inst = dynamic_cast< EnumInstType * > ( varExpr->result ) ) {
    164                                         long long int value;
    165                                         if ( inst->baseEnum->valueOf( varExpr->var, value ) ) {
    166                                                 size = value;
    167                                         }
    168                                 }
     152                void setSize( Expression * expr ) { // replace this logic with an eval call
     153                        auto res = eval(expr);
     154                        if (res.second) {
     155                                size = res.first;
    169156                        } else {
    170                                 assertf( false, "unhandled expression in setSize: %s", toString( expr ).c_str() ); // xxx - if not a constant expression, it's not simple to determine how long the array actually is, which is necessary for initialization to be done correctly -- fix this
     157                                SemanticError( expr->location, toString("Array designator must be a constant expression: ", expr) );
    171158                        }
    172159                }
  • src/SymTab/Validate.cc

    ra4248de1 r04e367c  
    6161#include "Parser/LinkageSpec.h"        // for C
    6262#include "ResolvExpr/typeops.h"        // for typesCompatible
     63#include "ResolvExpr/Resolver.h"       // for findSingleExpression
    6364#include "SymTab/Autogen.h"            // for SizeType
    6465#include "SynTree/Attribute.h"         // for noAttributes, Attribute
     
    7273#include "SynTree/TypeSubstitution.h"  // for TypeSubstitution
    7374#include "SynTree/Visitor.h"           // for Visitor
     75#include "Validate/HandleAttributes.h" // for handleAttributes
    7476
    7577class CompoundStmt;
     
    247249        };
    248250
    249         struct ArrayLength {
     251        struct ArrayLength : public WithIndexer {
    250252                /// for array types without an explicit length, compute the length and store it so that it
    251253                /// is known to the rest of the phases. For example,
     
    258260
    259261                void previsit( ObjectDecl * objDecl );
     262                void previsit( ArrayType * arrayType );
    260263        };
    261264
     
    312315                acceptAll( translationUnit, finder ); // xxx - remove this pass soon
    313316                mutateAll( translationUnit, labelAddrFixer );
     317                Validate::handleAttributes( translationUnit );
    314318        }
    315319
     
    12321236        void ArrayLength::previsit( ObjectDecl * objDecl ) {
    12331237                if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->type ) ) {
    1234                         if ( at->get_dimension() ) return;
     1238                        if ( at->dimension ) return;
    12351239                        if ( ListInit * init = dynamic_cast< ListInit * >( objDecl->init ) ) {
    1236                                 at->set_dimension( new ConstantExpr( Constant::from_ulong( init->initializers.size() ) ) );
    1237                         }
     1240                                at->dimension = new ConstantExpr( Constant::from_ulong( init->initializers.size() ) );
     1241                        }
     1242                }
     1243        }
     1244
     1245        void ArrayLength::previsit( ArrayType * type ) {
     1246                if ( type->dimension ) {
     1247                        // need to resolve array dimensions early so that constructor code can correctly determine
     1248                        // if a type is a VLA (and hence whether its elements need to be constructed)
     1249                        ResolvExpr::findSingleExpression( type->dimension, SymTab::SizeType->clone(), indexer );
     1250
     1251                        // must re-evaluate whether a type is a VLA, now that more information is available
     1252                        // (e.g. the dimension may have been an enumerator, which was unknown prior to this step)
     1253                        type->isVarLen = ! InitTweak::isConstExpr( type->dimension );
    12381254                }
    12391255        }
  • src/main.cc

    ra4248de1 r04e367c  
    2828#include <string>                           // for char_traits, operator<<
    2929
     30#include "CompilationState.h"
    3031#include "../config.h"                      // for CFA_LIBDIR
    3132#include "CodeGen/FixMain.h"                // for FixMain
     
    7273DeclarationNode * parseTree = nullptr;                                  // program parse tree
    7374
    74 extern int yydebug;                                                                             // set for -g flag (Grammar)
    75 bool
    76         astp = false,
    77         bresolvep = false,
    78         bboxp = false,
    79         bcodegenp = false,
    80         ctorinitp = false,
    81         declstatsp = false,
    82         exprp = false,
    83         expraltp = false,
    84         genericsp = false,
    85         libcfap = false,
    86         nopreludep = false,
    87         noprotop = false,
    88         nomainp = false,
    89         parsep = false,
    90         resolvep = false,                                                                       // used in AlternativeFinder
    91         symtabp = false,
    92         treep = false,
    93         tuplep = false,
    94         validp = false,
    95         errorp = false,
    96         codegenp = false,
    97         prettycodegenp = false,
    98         linemarks = false;
    99 
    10075static void parse_cmdline( int argc, char *argv[], const char *& filename );
    10176static void parse( FILE * input, LinkageSpec::Spec linkage, bool shouldExit = false );
     
    208183
    209184                        // Read to gcc builtins, if not generating the cfa library
    210                         FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
     185                        FILE * gcc_builtins = fopen( buildingLibrary() ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
    211186                        assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
    212187                        parse( gcc_builtins, LinkageSpec::Compiler );
    213188
    214189                        // read the extra prelude in, if not generating the cfa library
    215                         FILE * extras = fopen( libcfap | treep ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
     190                        FILE * extras = fopen( buildingLibrary() ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
    216191                        assertf( extras, "cannot open extras.cf\n" );
    217192                        parse( extras, LinkageSpec::BuiltinC );
     
    219194                        if ( ! libcfap ) {
    220195                                // read the prelude in, if not generating the cfa library
    221                                 FILE * prelude = fopen( treep ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
     196                                FILE * prelude = fopen( buildingLibrary() ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
    222197                                assertf( prelude, "cannot open prelude.cf\n" );
    223198                                parse( prelude, LinkageSpec::Intrinsic );
    224199
    225200                                // Read to cfa builtins, if not generating the cfa library
    226                                 FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     201                                FILE * builtins = fopen( buildingLibrary() ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    227202                                assertf( builtins, "cannot open builtins.cf\n" );
    228203                                parse( builtins, LinkageSpec::BuiltinCFA );
     
    299274
    300275                // fix ObjectDecl - replaces ConstructorInit nodes
    301                 PASS( "fixInit", InitTweak::fix( translationUnit, filename, libcfap || treep ) );
     276                PASS( "fixInit", InitTweak::fix( translationUnit, buildingLibrary() ) );
    302277                if ( ctorinitp ) {
    303278                        dump ( translationUnit );
  • src/tests/.expect/attributes.x64.txt

    ra4248de1 r04e367c  
    316316    ((void)sizeof(__attribute__ ((unused,unused)) signed int ));
    317317    ((void)sizeof(__attribute__ ((unused,unused,unused,unused)) signed int **));
    318     ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [5]));
    319     ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[10]));
     318    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [((unsigned long int )5)]));
     319    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[((unsigned long int )10)]));
    320320    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int ()));
    321321    struct __attribute__ ((unused)) __anonymous3 {
  • src/tests/Makefile.in

    ra4248de1 r04e367c  
    311311
    312312# SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
    313 # however, here it is more complicated because it must match the dependencies exactly
    314 # depencies seem to have the absolute path to the build directory and relative path
    315 # to the headers from there
     313# however, here it is more complicated because it must match the dependencies based on how
     314# they are generated by gcc
    316315headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
    317316headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
Note: See TracChangeset for help on using the changeset viewer.