[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overf
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows |
Date: |
Wed, 19 Nov 2003 17:01:59 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Thanks for your opinions.
Paul Eggert <address@hidden> writes:
> Another argument for avoiding _t in user-defined typedefs is that such
> names are reserved by POSIX and or Standard C (I forget which).
This seem like a rather serious argument against '_t'. Is *_t
reserved, or just some subset? Now that you mention it, I also
vaguely recall something about _t being reserved for "system types" or
something like that.
I wasn't able to find anything about it in my (possibly early draft
version of) C99 pdf.
>> Another option I have considered is to not use typedef at all, but
>> rather write 'struct foo *foo' instead of 'foo *foo' or 'foo_t *foo'.
>> (I got that idea from GNU lsh.)
>
> The main objection to that is that it requires foo to be a struct
> type; if you later change foo to be some other kind of type you'll be
> stuck. Other than that it's fine. In a way it's nicer since struct
> tags are a separate namespace.
Some things, like a library context handle, will never be anything but
a pointer to a struct, so this is probably not a big problem. It
might even make things more explicit, so the reader understands that
the variable represent complex data. But I see the problem if you
would over-use 'struct foo *' for every type; some might later change
into 'int*' or something.
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, (continued)
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/05
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/06
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/06
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/10
- Re: [Bug-gnulib] linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/10
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Simon Josefsson, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Simon Josefsson, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows,
Simon Josefsson <=
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, James Youngman, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Paul Eggert, 2003/11/19
- Re: [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Bruno Haible, 2003/11/19
- [Bug-gnulib] Re: linebreak.c proposed patches for size-calculation overflows, Simon Josefsson, 2003/11/19