Liste des Groupes | Revenir à cl c |
David Brown ha scritto:On 26/05/2024 17:10, jak wrote:
You /did/ mix these things up - the Usenet posts are there for you, me, or anyone else to read. But there seems little doubt now that you understand the difference between "gcc" and "g++", and between ".c" and ".C". So I assume the mixup was a language issue - I fully understand that it's not always easy to communicate accurately in a different language, and even when you are as good as you are in English, sometimes there are miscommunications.Sorry but no. I wrote that there are compilers who do it and when they?>
I really wrote that something similar (similar != equal) did g++ and
that, if you write c++ code in a file with the .c extension, the g++
compile it. I never wrote that it was automatically recognized.
In addition, you just explained why g++ compile a .c that contains c++
code. I don't understand: no what?
>
I made an error here - "g++ foo.c" /will/ treat the file as C++. I apologise for that, as it made things a lot more confusing.
>
But that is not what you wrote. Perhaps you didn't write what you intended to write. You said that g++ somehow determines whether to compile code as C or C++ based on the /contents/ of the file, not the filename suffix. And that is completely wrong.
>
You also mixed up ".c" and ".C". gcc considers ".c" to be C code, while ".C" (with a capital C) is considered C++.
>
>
replied, bringing the gcc as an example, I replied that the g++ does
something similar.
and no, I have not confused the .c with the .C:
Les messages affichés proviennent d'usenet.