Determining what canned preprocessor symbols are available 
Author Message
 Determining what canned preprocessor symbols are available

        Does anybody know a quick way (other than looking in a manual) to
determine what preprocessor symbols are available for a compiler?
For instance, how would I easily determine that:

__STDC__
sparc
sun
unix

are known by my (sun c) compiler?  Thanks in advance from a rusty, but
improving, old hacker.

Ric Steinberger

"For De Mille, young fur-henchmen can't be rowing!" Thomas Pynchon
                                                    Gravity's Rainbow



Tue, 06 May 1997 09:18:27 GMT  
 Determining what canned preprocessor symbols are available
Richard Steinberger:

Quote:
>    Does anybody know a quick way (other than looking in a manual) to
>determine what preprocessor symbols are available for a compiler?

Run strings(1) on the compiler and experiment!

Jari

PS. Is this a C topic? Not very.



Wed, 07 May 1997 04:13:46 GMT  
 Determining what canned preprocessor symbols are available

Quote:


>>        Does anybody know a quick way (other than looking in a manual) to
>>determine what preprocessor symbols are available for a compiler?
>Try "strings" on your cc, (or is it cpp, the preprocessor) in combination with
>"more".

What system are you talking about? How do you "try 'strings' on your
cc" on a machine runnig OS/2?  

Do not rely on available preprocessor symbols is the best advice in this
case, imho. Read the manual that comes with the compiler is second
best, I'd say.

Kurt
--
| Kurt Watzka                             Phone : +49-89-2180-2158




Tue, 13 May 1997 16:04:41 GMT  
 Determining what canned preprocessor symbols are available

Quote:

>    Does anybody know a quick way (other than looking in a manual) to
>determine what preprocessor symbols are available for a compiler?
>For instance, how would I easily determine that:
>__STDC__
>sparc
>sun
>unix
>are known by my (sun c) compiler?  Thanks in advance from a rusty, but
>improving, old hacker.

   Well, if you *think* you know the names of predefined macros ...

#include <stdio.h>

main()
{
#ifdef __STDC__
        printf("__STDC__ defined\n");
#endif

#ifdef sparc
        printf("sparc defined\n");
#endif

Quote:
}

   If you don't have much of an idea have a search through the man pages -
there should be something somewhere ... since __STDC__ is almost certain
to be defined search for it - it'll probably be included with the other
predefined macros. Or search on cc (or gcc as the case may be) - it should
also state the macros.

                                         _/_/_/_/
   _/_|  _/_|       _/_|     _/_/_/        _/_|     _/_/_/
  _/ _| _/ _|     _/  _|   _/            _/  _|   _/    _/
 _/  _|_/  _|   _/_/_/_|  _/   _/_/_/  _/_/_/_|  _/    _/
_/   _|    _| _/      _|  _/_/_/_/   _/      _|  _/_/_/




Thu, 08 May 1997 06:56:53 GMT  
 Determining what canned preprocessor symbols are available

Quote:

>    Does anybody know a quick way (other than looking in a manual) to
>determine what preprocessor symbols are available for a compiler?

Try "strings" on your cc, (or is it cpp, the preprocessor) in combination with
"more".


Mon, 12 May 1997 00:52:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. More Powerful Preprocessor Available?

2. C-Refine preprocessor really available (?)

3. C-Refine preprocessor available

4. Determining output file name based on preprocessor commands?

5. C-Refine 3.0 preprocessor available

6. C-Refine preprocessor available

7. Determine where I am running

8. #define - cannot define/undefine preprocessor symbols after first token in file

9. preprocessor symbol table doubt

10. preprocessor symbol table doubt

11. Preprocessor Q: conditional comparison when the symbol is undefined

12. preprocessor symbol

 

 
Powered by phpBB® Forum Software