470,849 Members | 839 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

#warning preprocessor command

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
7 4684
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
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

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
"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
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
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

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.

Similar topics

8 posts views Thread by Bram Stolk | last post: by
21 posts views Thread by Bogdan | last post: by
3 posts views Thread by Tom Baxter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.