From: John Carter <john.carter@tait.co.nz>
To: me22 <me22.ca@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: A little bit of C fun...
Date: Wed, 22 Oct 2008 22:35:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.00.0810231129480.8025@parore.tait.co.nz> (raw)
In-Reply-To: <fa28b9250810221502k180db1f4j55d6f636ba200f71@mail.gmail.com>
On Wed, 22 Oct 2008, me22 wrote:
> On Wed, Oct 22, 2008 at 15:37, John Carter <john.carter@tait.co.nz> wrote:
>> On Wed, 22 Oct 2008, me22 wrote:
>>
>>> Use the preprocessor. Otherwise you can't get braces inside parens.
>>
>> Nope. I didn't use preprocessor. But warped kudos to you for thinking
>> of it.
>>
>
> Say, what about -std=gnu++0x? Then the braces can be an initializer list...
>
I compiled this with gcc 3 and gcc 4 using -std=c89 and -std=c99 with
-Wall and -W.
gcc-2.95 failed
a(&(b){c})
but passed
a((b){c})
-W warns about a(&(b){}) but that is one of those cases where -W
warns about a potential omission in a legal operation.
And yes, you're on the right track now, the braces are an initializer list.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
next prev parent reply other threads:[~2008-10-22 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 4:45 John Carter
[not found] ` <fa28b925 0810212203u51a1da18n13ae93aabde567a0@mail.gmail.com>
[not found] ` <alpine.DEB.1.00.081023 0830390.23033@parore.tait.co.nz>
2008-10-22 5:04 ` me22
2008-10-22 19:38 ` John Carter
2008-10-22 20:13 ` Austin, Alex
2008-10-22 20:16 ` Austin, Alex
2008-10-22 22:03 ` me22
2008-10-22 22:35 ` John Carter [this message]
2008-10-22 23:12 ` John Carter
2008-11-29 20:52 ` code snippet sagrav
2008-11-29 23:53 ` Sven Eschenberg
[not found] ` <"fa28b92 5 0810212203u51a1da18n13ae93aabde567a0"@mail.gmail.com>
[not found] ` <"alpine.DEB.1.00.0810 23 0830390.23033"@parore.tait.co.nz>
[not found] ` <"alpine.DEB.1.00.0810 2 30830390.23033"@parore.tait.co.nz>
[not found] ` <3DC6D022E7CC5D41A9CA465499463C9E718C1BFE F8@mtk-sms-exch01.digi.com>
[not found] ` <3DC6D022E7CC5D41A9CA465499463C9E718C1BFEF8@mtk-sms-exch01.digi .com>
2008-10-22 22:00 ` A little bit of C fun John Carter
[not found] ` <alpine.DEB.1.00.08102 30830390.23033@parore.tait.co.nz>
[not found] ` <"3DC6D022E7CC5D41A9C A465499463C9E718C1BFEF8"@mtk-sms-exch01.digi.com>
[not found] ` <3DC6D022E7CC5D41A9CA46549 9463C9E718C1BFEFB@mtk-sms-exch01.digi.com>
[not found] ` <3DC6D022E7CC5D41A9CA465499463C9E718C1BFEFB@mtk-sms-exch01.digi .com>
2008-10-22 22:04 ` John Carter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0810231129480.8025@parore.tait.co.nz \
--to=john.carter@tait.co.nz \
--cc=gcc-help@gcc.gnu.org \
--cc=me22.ca@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).