Changeset dea36ee
- Timestamp:
- Jul 19, 2018, 11:21:02 PM (6 years ago)
- 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 69efef81, f7e4db27
- Parents:
- 68bceeb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r68bceeb rdea36ee 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 19 16:42:16 201813 // Update Count : 382 012 // Last Modified On : Thu Jul 19 22:21:56 2018 13 // Update Count : 3827 14 14 // 15 15 … … 1943 1943 type_specifier field_declaring_list_opt ';' 1944 1944 { 1945 if ( $2 ) { // field declarator ? 1946 $$ = distAttr( $1, $2 ); 1947 } else if ( $1->type && $1->type->kind == TypeData::Aggregate ) { 1948 $$ = DeclarationNode::newName( nullptr ); 1949 $$ = distAttr( $1, $$ ); // mark all fields in list 1950 } else { 1951 //SemanticError( yylloc, "Superfluous declaration, does not allocate storage." ); $$ = nullptr; 1952 SemanticWarning( yylloc, Warning::SuperfluousDecl, "" ); 1945 if ( ! $2 ) { // field declarator ? 1946 $2 = DeclarationNode::newName( nullptr ); 1947 if ( ! ( $1->type && $1->type->kind == TypeData::Aggregate ) ) { 1948 SemanticWarning( yylloc, Warning::SuperfluousDecl, "" ); 1949 } // if 1953 1950 } // if 1951 $$ = distAttr( $1, $2 ); // mark all fields in list 1954 1952 } 1955 1953 | EXTENSION type_specifier field_declaring_list_opt ';' // GCC 1956 1954 { 1957 if ( $3 ) { // field declarator ? 1958 $$ = distAttr( $2, $3 ); // mark all fields in list 1959 distExt( $3 ); 1960 } else if ( $2->type && $2->type->kind == TypeData::Aggregate && $2->type->aggregate.anon ) { 1961 $$ = DeclarationNode::newName( nullptr ); 1962 $$ = distAttr( $2, $$ ); // mark all fields in list 1963 distExt( $$ ); 1964 } else { 1965 // SemanticError( yylloc, "Superfluous declaration, does not allocate storage." ); $$ = nullptr; 1966 SemanticWarning( yylloc, Warning::SuperfluousDecl, "" ); 1955 if ( ! $3 ) { // field declarator ? 1956 $3 = DeclarationNode::newName( nullptr ); 1957 if ( ! ( $2->type && $2->type->kind == TypeData::Aggregate ) ) { 1958 SemanticWarning( yylloc, Warning::SuperfluousDecl, "" ); 1959 } // if 1967 1960 } // if 1961 $$ = distAttr( $2, $3 ); // mark all fields in list 1962 distExt( $$ ); 1968 1963 } 1969 1964 | INLINE type_specifier field_abstract_list_opt ';' // CFA 1970 1965 { 1966 if ( ! $3 ) { // field declarator ? 1967 $3 = DeclarationNode::newName( nullptr ); 1968 } // if 1971 1969 $3->inLine = true; 1972 1970 $$ = distAttr( $2, $3 ); // mark all fields in list … … 2004 2002 field_abstract_list_opt: 2005 2003 // empty 2006 { $$ = DeclarationNode::newName( nullptr ); }2004 { $$ = nullptr; } 2007 2005 | field_abstract 2008 2006 | field_abstract_list_opt ',' attribute_list_opt field_abstract
Note: See TracChangeset
for help on using the changeset viewer.