Skip to content

Commit

Permalink
Allow type alias of void type
Browse files Browse the repository at this point in the history
  • Loading branch information
positively-charged committed Jan 11, 2017
1 parent 930357d commit 670353f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/semantic/dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,6 @@ bool test_typedef_spec( struct semantic* semantic, struct type_alias* alias ) {
alias->enumeration = test.enumeration;
alias->dim = test.dim;
alias->spec = test.spec;
if ( alias->spec == SPEC_VOID && ! alias->ref ) {
s_diag( semantic, DIAG_POS_ERR, &alias->object.pos, alias->dim ?
"array type synonym has void element type" :
"type synonym has void type" );
s_bail( semantic );
}
// Public type alias must have a public type.
if ( ! semantic->in_localscope && ! alias->hidden && ! test.public_spec ) {
s_diag( semantic, DIAG_POS_ERR, &alias->object.pos,
Expand Down

0 comments on commit 670353f

Please sign in to comment.