linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is defined() macro portable or GNU only?
@ 2015-09-30 19:25 Daniel.
  2015-09-30 21:27 ` [EXTERNAL] " Curry, Matthew Leon
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel. @ 2015-09-30 19:25 UTC (permalink / raw)
  To: linux-c-programming@vger.kernel.org

Hi all,

I used to check definitions with #ifdef, but in cases where
multiple macros are checked I use #if defined(foo) && defined(bar).
Is this defined() check portable/standard? Or is some kind of
extension added by GCC?

Regards,
- dhs
-- 
"Do or do not. There is no try"
  Yoda Master

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] Is defined() macro portable or GNU only?
  2015-09-30 19:25 Is defined() macro portable or GNU only? Daniel.
@ 2015-09-30 21:27 ` Curry, Matthew Leon
  2015-10-01 13:11   ` Daniel.
  0 siblings, 1 reply; 3+ messages in thread
From: Curry, Matthew Leon @ 2015-09-30 21:27 UTC (permalink / raw)
  To: Daniel., linux-c-programming@vger.kernel.org

It¹s part of ANSI C, and is described in K&R.

Matthew

On 9/30/15, 1:25 PM, "linux-c-programming-owner@vger.kernel.org on behalf
of Daniel." <linux-c-programming-owner@vger.kernel.org on behalf of
danielhilst@gmail.com> wrote:

>Hi all,
>
>I used to check definitions with #ifdef, but in cases where
>multiple macros are checked I use #if defined(foo) && defined(bar).
>Is this defined() check portable/standard? Or is some kind of
>extension added by GCC?
>
>Regards,
>- dhs
>-- 
>"Do or do not. There is no try"
>  Yoda Master
>--
>To unsubscribe from this list: send the line "unsubscribe
>linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] Is defined() macro portable or GNU only?
  2015-09-30 21:27 ` [EXTERNAL] " Curry, Matthew Leon
@ 2015-10-01 13:11   ` Daniel.
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel. @ 2015-10-01 13:11 UTC (permalink / raw)
  To: Curry, Matthew Leon; +Cc: linux-c-programming@vger.kernel.org

Thank you Matthew!

Regards,
- dhs

2015-09-30 18:27 GMT-03:00 Curry, Matthew Leon <mlcurry@sandia.gov>:
> It¹s part of ANSI C, and is described in K&R.
>
> Matthew
>
> On 9/30/15, 1:25 PM, "linux-c-programming-owner@vger.kernel.org on behalf
> of Daniel." <linux-c-programming-owner@vger.kernel.org on behalf of
> danielhilst@gmail.com> wrote:
>
>>Hi all,
>>
>>I used to check definitions with #ifdef, but in cases where
>>multiple macros are checked I use #if defined(foo) && defined(bar).
>>Is this defined() check portable/standard? Or is some kind of
>>extension added by GCC?
>>
>>Regards,
>>- dhs
>>--
>>"Do or do not. There is no try"
>>  Yoda Master
>>--
>>To unsubscribe from this list: send the line "unsubscribe
>>linux-c-programming" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
"Do or do not. There is no try"
  Yoda Master
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-01 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 19:25 Is defined() macro portable or GNU only? Daniel.
2015-09-30 21:27 ` [EXTERNAL] " Curry, Matthew Leon
2015-10-01 13:11   ` Daniel.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).