Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    r3fe34ae rfaddbd8  
    2323#include "InitTweak/InitTweak.h"
    2424
    25 extern bool translation_unit_nomain;
    26 
    2725FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes )
    2826                : Parent( name, sc, linkage, attributes ), type( type ), statements( statements ) {
    2927        set_isInline( isInline );
    3028        set_isNoreturn( isNoreturn );
    31         // this is a brazen hack to force the function "main" to have Cforall linkage
    32         // because we want to replace the main even if it is inside an extern
     29        // this is a brazen hack to force the function "main" to have C linkage
    3330        if ( name == "main" ) {
    34                 set_linkage( translation_unit_nomain ? LinkageSpec::C : LinkageSpec::Cforall );
     31                set_linkage( LinkageSpec::C );
    3532        } // if
    3633}
Note: See TracChangeset for help on using the changeset viewer.