Changes in / [16a18f3:295ed2a4]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r16a18f3 r295ed2a4  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct 19 19:30:38 2019
    13 // Update Count     : 506
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr May  2 10:47:00 2019
     13// Update Count     : 497
    1414//
    1515#include "CodeGenerator.h"
     
    198198                // deleted decls should never be used, so don't print them
    199199                if ( objectDecl->isDeleted && options.genC ) return;
    200 
    201                 // gcc allows an empty declarator (no name) for bit-fields and C states: 6.7.2.1 Structure and union specifiers,
    202                 // point 4, page 113: If the (bit field) value is zero, the declaration shall have no declarator.  For anything
    203                 // else, the anonymous name refers to the anonymous object for plan9 inheritance.
    204                 if ( objectDecl->get_name().empty() && options.genC && ! objectDecl->get_bitfieldWidth() ) {
     200                if (objectDecl->get_name().empty() && options.genC ) {
    205201                        // only generate an anonymous name when generating C code, otherwise it clutters the output too much
    206202                        static UniqueName name = { "__anonymous_object" };
    207203                        objectDecl->set_name( name.newName() );
    208                         // Stops unused parameter warnings.
    209                         if ( options.anonymousUnused ) {
    210                                 objectDecl->attributes.push_back( new Attribute( "unused" ) );
    211                         }
     204            // Stops unused parameter warnings.
     205            if ( options.anonymousUnused ) {
     206                objectDecl->attributes.push_back( new Attribute( "unused" ) );
     207            }
    212208                }
    213209
Note: See TracChangeset for help on using the changeset viewer.