All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derek M Jones <derek@knosof.co.uk>
To: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Cc: David Given <dg@cowlark.com>,
	linux-sparse@vger.kernel.org, Josh Triplett <josh@kernel.org>
Subject: Re: [PATCH 2/15 v2] Unhardcode byte size being 8 bits.
Date: Thu, 18 Dec 2008 13:05:45 +0000	[thread overview]
Message-ID: <494A4AA9.1060707@knosof.co.uk> (raw)
In-Reply-To: <f19298770812171911u1e7e3cc0i11d33544cd519fea@mail.gmail.com>

Alexey,

>> "This is a GCC extension. sizeof(void) is invalid C and should error out
>> and does with -pedantic-errors"
>>
>> Yuk, who ever thought to use -pedantic-errors!
>>
>> -ansi or -std=c89 or -std=c99 don't elicit any diagnostics.
> 
> I don't really see why you take this as a tragedy. People seem
> to like this extension:

I appreciate the reason for wanting to make this extension to
be friendly to people wanting to migrate pre-C standard code
and start using void.

There is plenty of opportunity for all sorts of subtle bugs here
and I would have hoped that gcc was more proactive in warning
users.  If people writing new code want a pointer to behave like
a char * then why not declare the fact.

Of course sparse has to support this usage, but I would expect it
to flag any usage as an error.

-- 
Derek M. Jones                         tel: +44 (0) 1252 520 667
Knowledge Software Ltd                 mailto:derek@knosof.co.uk
Source code analysis                   http://www.knosof.co.uk

  reply	other threads:[~2008-12-18 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 20:05 [PATCH 2/15 v2] Unhardcode byte size being 8 bits Alexey Zaytsev
2008-12-17 23:33 ` David Given
2008-12-18  0:33   ` Alexey Zaytsev
2008-12-18  0:58     ` David Given
2008-12-18  1:24       ` Alexey Zaytsev
2008-12-18  1:10     ` Derek M Jones
2008-12-18  1:52       ` Derek M Jones
2008-12-18  3:11         ` Alexey Zaytsev
2008-12-18 13:05           ` Derek M Jones [this message]
2008-12-18 17:07             ` Alexey Zaytsev
2008-12-18 17:12 ` David Given

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=494A4AA9.1060707@knosof.co.uk \
    --to=derek@knosof.co.uk \
    --cc=alexey.zaytsev@gmail.com \
    --cc=dg@cowlark.com \
    --cc=josh@kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.