#warning preprocessor command

D

ddehterov

Hello,

I'm wondering, is #warning preprocessor command is documented in
standart C
or it's implementation specific? I cannot find any documentation about
it.
It works with gcc on freebsd and linux.
 
R

Robert Gamble

Hello,

I'm wondering, is #warning preprocessor command is documented in
standart C
or it's implementation specific? I cannot find any documentation about
it.
It works with gcc on freebsd and linux.

Standard C defines the #error directive, #warning is a GNU extension.

Robert Gamble
 
K

Keith Thompson

I'm wondering, is #warning preprocessor command is documented in
standart C or it's implementation specific? I cannot find any
documentation about it. It works with gcc on freebsd and linux.

It's implementation specific.

The standard preprocessor directives are:

#include
#define
#undef
#line
#error
#pragma
#

The latter is a null directive; it has no effect.
 
R

Robert Gamble

Keith said:
It's implementation specific.

The standard preprocessor directives are:

#include
#define
#undef
#line
#error
#pragma
#

The latter is a null directive; it has no effect.

#if, #ifdef, #ifndef, #elif, #else, and #endif are preprocessing
directive too.

Robert Gamble
 
K

Keith Thompson

Robert Gamble said:
#if, #ifdef, #ifndef, #elif, #else, and #endif are preprocessing
directive too.

Sure, but they don't really count, because they aren't on the page I
was looking at.

In other words, oops.
 
S

Skarmander

Keith said:
Sure, but they don't really count, because they aren't on the page I
was looking at.

In other words, oops.
I would have made that "those are not in *my* copy of the standard".

The requisite follow-up could have included a dog.

S.
 
K

Keith Thompson

Skarmander said:
I would have made that "those are not in *my* copy of the standard".

The requisite follow-up could have included a dog.

Yes, the dog (well, more likely a cat) ate that page of my PDF file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Command Line Arguments 0
preprocessor bug? 2
QoI issue: silencing a warning 31
Preprocessor 3
Preprocessor commands usage. 11
Preprocessor question 3
Order of preprocessor macro replacement 3
Preprocessor unique names 6

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top