Skip to content

C89 code generating an error with uno #7

@damorinCan

Description

@damorinCan

Hi,

an old legacy code generates an error in uno.

The code "odd.c", compiled with 'gcc -std=c89 odd.c' (gcc 13.0), is accepted by the compiler. Uno is generating this:

./odd.c:7: Error (syntax error) before '{'
return ({ c = c + 1; });
^
1 errors

#include <stdio.h>

int c = 1;

static int odd(void)
{
  return ({ c = c + 1; });
}

int main(int argc, char **argv)
{
  printf( "Odd = %d\r\n", odd() );
  return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions