Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does GCC C89/C90 ANSI C use __STDC_VERSION__ in Eclipse?

I need to confirm my code if I'm using ANSI C (C89/C90) and I notice this:

enter image description here

Even if I have selected ASNI C (C89/C90) standard in Eclipse CDT.

enter image description here

Question:

It is told that ANSI C does not use __STDC_VERSION__ but why do I see the same value for __STDC_VERSION__ as 199901L for C99 standard in Eclipse CDT?

I'm using GCC compiler for Lubuntu Linux.

like image 957
Nazi Bhattacharya Avatar asked Dec 06 '25 15:12

Nazi Bhattacharya


1 Answers

I have tested it. Eclipse CDT simply shows the oldest value programmed. It does not have anything in common with the actual __STDC_VALUE__ seen by the compiler.

When you compile as C90 __STDC_VALUE__ is not defined and value shown in the Eclipse is not valid. I believe that it is an Eclipse bug.

Colouring is also wrong.

enter image description here

like image 108
0___________ Avatar answered Dec 08 '25 09:12

0___________



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!