By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,898 Members | 2,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,898 IT Pros & Developers. It's quick & easy.

#warning preprocessor command

P: n/a
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.

--
Dmitri

Jun 29 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
dd*******@gmail.com wrote:
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

Jun 29 '06 #2

P: n/a
dd*******@gmail.com writes:
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 29 '06 #3

P: n/a

Keith Thompson wrote:
dd*******@gmail.com writes:
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.


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

Robert Gamble

Jun 29 '06 #4

P: n/a
"Robert Gamble" <rg*******@gmail.com> writes:
Keith Thompson wrote:
dd*******@gmail.com writes:
> 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.


#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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 29 '06 #5

P: n/a
Keith Thompson wrote:
"Robert Gamble" <rg*******@gmail.com> writes:
Keith Thompson wrote:
dd*******@gmail.com writes:
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.

#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.

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

The requisite follow-up could have included a dog.

S.
Jun 29 '06 #6

P: n/a
Skarmander <in*****@dontmailme.com> writes:
Keith Thompson wrote:
"Robert Gamble" <rg*******@gmail.com> writes:
Keith Thompson wrote:
dd*******@gmail.com writes:
> 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.
#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.

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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 29 '06 #7

P: n/a

Robert Gamble wrote:
dd*******@gmail.com wrote:
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.


Thanks.

Robert Gamble


Dmitri

Jun 30 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.