Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Preprocessing directive like #error which doesn't stop compilation (http://www.velocityreviews.com/forums/t313829-preprocessing-directive-like-error-which-doesnt-stop-compilation.html)

Alex Vinokur 06-26-2003 03:12 AM

Preprocessing directive like #error which doesn't stop compilation
 
Is there any preprocessing directive like #error which doesn't stop compilation?

For instance,
# info text


==========================================
Alex Vinokur
mailto:alexvn@connect.to
http://www.simtel.net/pub/oth/19088.html
http://sourceforge.net/users/alexvn
==========================================



Simon Biber 06-26-2003 03:45 AM

Re: Preprocessing directive like #error which doesn't stop compilation
 
"Alex Vinokur" <alexvn@bigfoot.com> wrote:
> Is there any preprocessing directive like #error which
> doesn't stop compilation?
>
> For instance,
> # info text


There is none in standard C, but some compilers support #warning.

--
Simon.



Darrell Grainger 06-26-2003 12:24 PM

Re: Preprocessing directive like #error which doesn't stop compilation
 
On Thu, 26 Jun 2003, Alex Vinokur wrote:

> Is there any preprocessing directive like #error which doesn't stop compilation?


There is nothing defined by the C standard but some compilers offer
non-standard preprocessor directives like #warning. Additionally, some
compilers will have a #pragma option for spitting out warnings or
comments.

You'll have to check your compiler documentation or ask in a newsgroup
that would be familar with your compiler.

> For instance,
> # info text
>
>
> ==========================================
> Alex Vinokur
> mailto:alexvn@connect.to
> http://www.simtel.net/pub/oth/19088.html
> http://sourceforge.net/users/alexvn
> ==========================================
>
>
>


--
main(){int j=1234;char t[]=":@abcdefghijklmnopqrstuvwxyz.\n",*i=
"iqgbgxmdbjlgdv.lksrqek.n";char *strchr(const char *,int);while(
*i){j+=strchr(t,*i++)-t;j%=sizeof t-1;putchar(t[j]);} return 0;}


Dan Pop 06-26-2003 02:14 PM

Re: Preprocessing directive like #error which doesn't stop compilation
 
In <Pine.GSO.4.44.0306260822400.27569-100000@qew.cs> darrell@cs.toronto.edu (Darrell Grainger) writes:

>On Thu, 26 Jun 2003, Alex Vinokur wrote:
>
>> Is there any preprocessing directive like #error which doesn't stop compilation?

>
>There is nothing defined by the C standard but some compilers offer
>non-standard preprocessor directives like #warning. Additionally, some
>compilers will have a #pragma option for spitting out warnings or
>comments.
>
>You'll have to check your compiler documentation or ask in a newsgroup
>that would be familar with your compiler.


Even better, give up the idea. If the issue is not important enough to
warrant an #error, don't bother the user with unnecessary compilation
messages.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de

Vijay B 06-26-2003 10:15 PM

Re: Preprocessing directive like #error which doesn't stop compilation
 
C does not provide a mechanism to let compilation proceed. However if
you are familiar with a bit of system programming then you can neglect
the signals (which in most cases caouse the program to abort). This is
very dangerous ...but if you are absolutely sure that you want to
block out signals then go ahead. This is done via the sigaction system
call . Take a look at the documentation for sigaction to see how to
block the signals. This is more of an OS thing rather than a C
language and is a solution for only Unix systems


Vijay

darrell@cs.toronto.edu (Darrell Grainger) wrote in message news:<Pine.GSO.4.44.0306260822400.27569-100000@qew.cs>...
> On Thu, 26 Jun 2003, Alex Vinokur wrote:
>
> > Is there any preprocessing directive like #error which doesn't stop compilation?

>
> There is nothing defined by the C standard but some compilers offer
> non-standard preprocessor directives like #warning. Additionally, some
> compilers will have a #pragma option for spitting out warnings or
> comments.
>
> You'll have to check your compiler documentation or ask in a newsgroup
> that would be familar with your compiler.
>
> > For instance,
> > # info text
> >
> >
> > ==========================================
> > Alex Vinokur
> > mailto:alexvn@connect.to
> > http://www.simtel.net/pub/oth/19088.html
> > http://sourceforge.net/users/alexvn
> > ==========================================
> >
> >
> >



All times are GMT. The time now is 01:18 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.