I presumed from context he was meaning the GNU C Compiler, aka gcc.
He may have meant GNU Compiler Collection, but that doesn't strike me as likely or making all that much sense.
Your project's .pde is compiled with the AVR port of g++.
rFree, in that piece of code, what are you trying to do?
new is a keyword in C++ but not in C. Also malloc returns a void*
is this what you intend in that example, if so it does compile without problem:
int newPointer = (int)malloc(sizeof('a'));
I still have no idea what you are on about. The Arduino IDE uses C. The language everyone programs an Arduino in is C. If you want to learn to program an Arduino get a C book.
I am beginning to doubt this is going anywhere constructive, but it may help if rFree clarified why he thinks the .pde files are not valid C. Bear in mind that Arduino uses the AVR-GCC compiler. This is a C++ compiler so note the usual caveats about C++ keywords in C code. There are also restrictions due to the AVR environment documented for that compiler. These caveats and restrictions are not Arduino specific.
...but it may help if rFree clarified why he thinks the .pde files are not valid C.
Because they are not?
I think of the .pde files as valid (not complete/compiling) C++, with some additional abstractions (Function prototypes and #includes).
If the point being made was that some of the abstractions (libraries for example) are C++ then perhaps that should have been stated more clearly.
It's a lot more helpful to say something like: the .pde combines valid C with calls to C and C++ abstractions, rather then saying that standard C command won't work in the Arduino IDE (which is I think what was being communicated in reply #6).
The intention of that line of code was to demonstrate a line of standard C which would break your .pde file. It however is fine in a .c file.
(One can incorporate .c files in your sketch, the C compiler will be used for these which is why previously I said Mike Mc was "mostly wrong")
There are 3 incompatibilities demonstrated in that line, two of them you noticed.
Now all this is relevant because if you go around telling people they can just copy and paste ANSI C into a .pde without concern for porting it to C++, then you'd be lying and they'd be frustrated and annoyed.
The title of this thread is about translating arduino code to C/C++ and the OPs initial post refers to C/C++, as does the initial reply.
To respond with a post that the pde files are most certainly not C seems at best not helpful, and could be considered nitpicking.
Yes, reply #2 left off the C++ part, but come on guys, adding information that helps the OP understand how Arduino relates to C/C++ would be more helpful then jumping on a point of detail.
Turning on build.verbose in your preferences file will give you a clearer picture of how things work.
Building/uploading an arduino sketch will leave .hex files, along with other stuff like the pre-processed source and .elf files, in a temporary folder. /applet, usually...