LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   C-cpp forgets to remove gcc-keywords and to expand __restrict-macro (https://www.linuxquestions.org/questions/fedora-35/c-cpp-forgets-to-remove-gcc-keywords-and-to-expand-__restrict-macro-288845/)

bramadams 02-11-2005 04:53 AM

C-cpp forgets to remove gcc-keywords and to expand __restrict-macro
 
Hi,

I've got some tools which work on preprocessed C-files. On my Slackware 10.0- and RH 9.0-boxes, all goes well. However, another user running FC3 on an Athlon 800 with gcc 3.4.2 encountered some problems. Those were FC-specific, because nothing went wrong when he worked on a Debian box.

When I compared his preprocessed file with a normal one, I saw that gcc-keywords like __extension__, __attribute__, ... were all there, unlike the usual case. Now, I was able to circumvent this somehow, but the resulting file still gave trouble.

On second look, I saw that the __restrict-macro in the signature of fopen(...), freopen(...), ... wasn't expanded. After removing this macro, everything worked as normal again.

Both issues led me to the idea that something was wrong with the cpp-preprocessor (some switch (un)set by default?) or with some environment variable. As I don't use FC3, I don't have a clue as to where I should look.

So, has anybody experienced similar trouble preprocessing a C-file? Any ideas about whether it's a bug or an incomplete environment?

Any help appreciated,


All times are GMT -5. The time now is 01:37 AM.