C and C++ standards using in GCC

keshav yadav keshav.yadav2005@gmail.com
Tue Jun 8 18:07:00 GMT 2010


Thanks for your reply,

I want to know where in source code of gcc,i can chage the deafult
c/c++  standards?

On Mon, Jun 7, 2010 at 10:41 AM, Ian Lance Taylor <iant@google.com> wrote:
> keshav yadav <keshav.yadav2005@gmail.com> writes:
>
>> Is there any option by which we can get default c,c++ standard.
>
> I'm not sure exactly what you are asking.  I suspect that you can
> figure the answer if you read the documentation for the -std option,
> as I suggested in my earlier reply.  If that does not answer your
> question, can you tell us more about what you are trying to find out?
>
> Ian
>
>
>> On Fri, Jun 4, 2010 at 9:16 PM, Ian Lance Taylor <iant@google.com> wrote:
>>> naveen yadav <yad.naveen@gmail.com> writes:
>>>
>>>> I want to know which  C / C++ standard my gcc is supported, Is there
>>>> any method to find ?
>>>
>>> Check the documentation which comes with your gcc.  Look for the -std
>>> option.
>>>
>>>
>>>>>From below site, they say C standard is ‘gnu90’, and C++ standard is ‘gnu++98’.
>>>>
>>>> http://gcc.gnu.org/onlinedocs/gcc/Standards.html
>>>>
>>>>
>>>> Is it applicable to all gcc versions currently available?
>>>
>>> It's applicable to all supported versions of gcc, but since gcc is
>>> free software all versions are in a sense available.
>>>
>>>
>>>> I try using below method
>>>>
>>>> [naveen@localhost ~]$ gcc -std=gnu99  test1.c -v
>>>
>>> Yes, that works too.  If you try with an unsupported version, you will
>>> get an error.
>>>
>>> Ian
>>>
>



More information about the Gcc-help mailing list