If using a GCC compiler, the dialect is -std=gnuXX where XX is the latest year 
supported by the compiler.  
In order these are: gnu89 gnu90, gnu9x, gnu99, gnu11, gnu1x, gnu17, gnu18, 
gnu19, gnu20, gnu2x

This also happens to be the default if you do not specify -std

The Source Code does NOT contain #ifdef's to "turn off" GNU extensions when a 
GNU compiler is being used, so if you are using a GNU compiler you MUST use it 
in a GNU compliant mode.  The actual version that is required when using a GNU 
compiler is probably gnu89, that is, ANSI C with GNU extensions.

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On
>Behalf Of Dennis Clarke
>Sent: Tuesday, 19 November, 2019 06:29
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] What is the C language standard to which sqlite
>conforms ?
>
>On 11/19/19 12:32 AM, Scott Robison wrote:
>> On Mon, Nov 18, 2019 at 3:44 PM Dennis Clarke <dcla...@blastwave.org>
>wrote:
>>
>>>
>>> Same question as a few days ago.
>>>
>>> This may have been asked many times before but always seems to be a
>>> valid question.  On some machines with different compilers I get good
>>> results using C99 strict compliance. On other machines, such as those
>>> running Red Hat Enterprise Linux, I get terrible results.
>>>
>>
>> Per https://www.sqlite.org/howtocompile.html it is "ANSI-C". C89 is the
>> ANSI-C standard, C90 is the first ISO-C standard. They are practically
>> identical.
>>
>> Note that it is not strict ANSI-C, since ANSI-C doesn't provide for 64
>bit
>> integers, and it does not provide for platform specific APIs or
>functions.
>> But as much as is possible, it is written to work with standard C as it
>has
>> existed for about 30 years now.
>>
>
>The code never passes its own test suite on Red Hat Enterprise Linux
>when compiled with strict C90 flags.  In fact, the process segfaults.
>Actually it is worse than that. The strict C90 flags cause the gcc
>compiler to fail entirely due to the use of "asm" in the code.
>
>Yes I have tried gcc 9.2.0 and the whole process fails in the tests
>and no it will not compile as C90 code.
>
>Dennis Clarke
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to