Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > #warning preprocessor command

Reply
Thread Tools

#warning preprocessor command

 
 
ddehterov@gmail.com
Guest
Posts: n/a
 
      06-29-2006
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

 
Reply With Quote
 
 
 
 
Robert Gamble
Guest
Posts: n/a
 
      06-29-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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

 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      06-29-2006
(E-Mail Removed) 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) (E-Mail Removed) <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.
 
Reply With Quote
 
Robert Gamble
Guest
Posts: n/a
 
      06-29-2006

Keith Thompson wrote:
> (E-Mail Removed) 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

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      06-29-2006
"Robert Gamble" <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> (E-Mail Removed) 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) (E-Mail Removed) <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.
 
Reply With Quote
 
Skarmander
Guest
Posts: n/a
 
      06-29-2006
Keith Thompson wrote:
> "Robert Gamble" <(E-Mail Removed)> writes:
>> Keith Thompson wrote:
>>> (E-Mail Removed) 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.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      06-29-2006
Skarmander <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> "Robert Gamble" <(E-Mail Removed)> writes:
>>> Keith Thompson wrote:
>>>> (E-Mail Removed) 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) (E-Mail Removed) <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.
 
Reply With Quote
 
ddehterov@gmail.com
Guest
Posts: n/a
 
      06-30-2006

Robert Gamble wrote:
> (E-Mail Removed) 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VS6 : Fatal error C1021: invalid preprocessor command 'using' Boris Kuznetsov C++ 5 09-12-2005 01:27 PM
Compiler error occurred when try to use a flexible template expression in preprocessor definesCompiler error occurred when try to use a flexible template expression in preprocessor defines snnn C++ 6 03-14-2005 04:09 PM
preprocessor, token concatenation, no valid preprocessor token Cronus C++ 1 07-14-2004 11:10 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net 4 10-23-2003 11:09 AM
copying value of DDL in a Datagrid "pre-edit command" to value in "post edit command" San Diego Guy ASP .Net 0 08-07-2003 08:59 PM



Advertisments