tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /usr/bin/c99



On Wed, Sep 3, 2008 at 3:42 PM, Denis Lagno <dlagno%rambler.ru@localhost> wrote:
>> gcc by default is started in non-c99 mode. The idea is to add c99
>> script to start gcc in c99 compatible mode.
> maybe "cc" script should start gcc in c99 compatible mode? Just a thought.

Some sample:

char *(*f)(char *restrict, char *restrict);
int main()
{
        return 0;
}

$ cc -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 tst1.c
tst1.c:1: error: redefinition of parameter 'restrict'
tst1.c:1: error: previous definition of 'restrict' was here

$ cc --std=c99 -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE
-D_POSIX_C_SOURCE=200112 tst1.c

-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index