Re: One more question (different now)
Warner Losh wrote: > > In message <[EMAIL PROTECTED]> "David O'Brien" writes: > : On Thu, May 11, 2000 at 12:48:40PM -0600, Warner Losh wrote: > : > In the US, how do I get the same thing for C++? > : > : http://web.ansi.org/public/std_info.html > : > : Search for "C++": > : > : ISO/IEC 14882:1998 Programming languages - C++ $ 305 > : ISO/IEC 14882-1998 Information Technology - Programming Languages - C++ $18 > > That's cool. I can get the electronic version for only $18. What > format is it in? PDF, according to http://webstore.ansi.org/default.asp which is the page you end up at once you create a profile and login. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC [EMAIL PROTECTED] http://softweyr.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
In <[EMAIL PROTECTED]>, Sheldon Hearn wrote: > > > On Thu, 11 May 2000 03:58:57 +0200, Bernd Luevelsmeyer wrote: > > > The Standard itself is a book and can be bought as such in bookstores. > > Can you give us details? Do I just hunt Amazon.com for "C99", or does > it have a proper title? I need this one. "Not yet" is what comp.std.c says, but any time soon. It is excepted to be available as a cheap PDF like the C++ standard. [info could be out of date, didn't check news for weeks] Martin -- % Martin Cracauer <[EMAIL PROTECTED]> http://www.cons.org/cracauer/ BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
In message <[EMAIL PROTECTED]> Warner Losh writes: : That's cool. I can get the electronic version for only $18. What : format is it in? Never mind. Found that it is in PDF. Now where did I put that credit card... Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
Warner Losh wrote: > > In message <[EMAIL PROTECTED]> Bernd Luevelsmeyer writes: > : What you want is "ISO/IEC 9899:1999 Programming languages -- C" > > In the US, how do I get the same thing for C++? > > Warner I don't talk C++, but I think you'll want "ISO/IEC 14882:1998 Programming languages -- C++", and in the USA you'll get it from the USA standard body, which (I think) is ANSI. I don't know how ANSI handles selling Standard copies, but http://www.ansi.org/ should tell it somewhere. The C++ FAQ talks about getting the Standard in http://marshall-cline.home.att.net/cpp-faq-lite/big-picture.html#[6.12] Greetings, Bernd To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
In message <[EMAIL PROTECTED]> "David O'Brien" writes: : On Thu, May 11, 2000 at 12:48:40PM -0600, Warner Losh wrote: : > In the US, how do I get the same thing for C++? : : http://web.ansi.org/public/std_info.html : : Search for "C++": : : ISO/IEC 14882:1998 Programming languages - C++ $ 305 : ISO/IEC 14882-1998 Information Technology - Programming Languages - C++ $18 That's cool. I can get the electronic version for only $18. What format is it in? Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Thu, May 11, 2000 at 12:48:40PM -0600, Warner Losh wrote: > In the US, how do I get the same thing for C++? http://web.ansi.org/public/std_info.html Search for "C++": ISO/IEC 14882:1998 Programming languages - C++ $ 305 ISO/IEC 14882-1998 Information Technology - Programming Languages - C++ $18 -- -- David([EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
In message <[EMAIL PROTECTED]> Bernd Luevelsmeyer writes: : What you want is "ISO/IEC 9899:1999 Programming languages -- C" In the US, how do I get the same thing for C++? Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
Sheldon Hearn wrote: > > On Thu, 11 May 2000 03:58:57 +0200, Bernd Luevelsmeyer wrote: > > > The Standard itself is a book and can be bought as such in bookstores. > > Can you give us details? Do I just hunt Amazon.com for "C99", or does > it have a proper title? I need this one. What you want is "ISO/IEC 9899:1999 Programming languages -- C" Where and how exactly you can get the book depends on national circumstances. The C Standard is an ISO Standard, hence distribution is handled by the national standards organization which is associated to ISO. Best might be to find your member body in http://www.iso.ch/addresse/membodies.html and contact them how to get ISO Standards. They will have a 'how to purchase' on their web page, I assume. I also recommend the FAQ: http://www.iso.ch/infoe/faq.htm ; you can search for Standards on http://www.iso.ch/cate/cat.html In Germany, ISO Standards are handled by 'DIN' (www.din.de), which has passed the printing and selling matters to the publishing house 'Beuth Verlag'. Hence, in Germany you buy the Standard as a book from Beuth Verlag. It's quite expensive by the way, when we got it we had to pay about 700 German Mark. Have fun, Bernd To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Thu, 11 May 2000 03:58:57 +0200, Bernd Luevelsmeyer wrote: > The Standard itself is a book and can be bought as such in bookstores. Can you give us details? Do I just hunt Amazon.com for "C99", or does it have a proper title? I need this one. Thanks, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
David Malone wrote: > > On Thu, May 11, 2000 at 07:53:27AM +1000, Bruce Evans wrote: > > > From the C99 draft (n869.txt): > > Is the C99 draft generally available, or where can you cough up > cash to get a copy? The Standard itself is a book and can be bought as such in bookstores. Draft versions are still available at the committee's web site, http://anubis.dkuug.dk/JTC1/SC22/WG14/www/docs/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Thu, May 11, 2000 at 07:53:27AM +1000, Bruce Evans wrote: > From the C99 draft (n869.txt): Is the C99 draft generally available, or where can you cough up cash to get a copy? David. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Wed, 10 May 2000, Doug Rabson wrote: > On Wed, 10 May 2000, Simon Shapiro wrote: > > It actually worked! Now I will go and see what this uintptr_t > > actually is :-) > > Its an unsigned integer type which is the same size as a pointer (i.e. its > safe to cast a pointer to uintptr_t without losing information). Actually, it is only guaranteed that casting a void * to uintptr_t doesn't lose information, and the size of uintptr_t may be anything that works. >From the C99 draft (n869.txt): 7.18.1.4 Integer types capable of holding object pointers [#1] The following type designates a signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: intptr_t The following type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: uintptr_t These types are optional.| [C99 has standard macros which can be used in ifdefs to determine whether optional types exist. Optional types should exist if they can exist. FreeBSD doesn't support C99, but uintptr_t exists for all supported arches. The C00 macros to support it are not implemented.] Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Wed, 10 May 2000, Simon Shapiro wrote: > > On 10-May-00 Doug Rabson wrote: > > On Tue, 9 May 2000, Mike Smith wrote: > > > >> > On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: > >> > > The only answer I've seen for this one is to kick, hard, whoever it was > >> > > that added -Wcast-qual to the kernel options. > >> > > >> > Or we should just delete it from the options. > >> > >> Ugh. I don't actually like that, because it serves a valid purpose. > >> What irritates me mostly is just that there is no way of casting a > >> volatile object into a non-volatile type, so you can't implement any sort > >> of conditional volatility exclusion. > > > > You can suppress the warning if you cast to uintptr_t first. Pretty ugly > > though. > > It actually worked! Now I will go and see what this uintptr_t > actually is :-) Its an unsigned integer type which is the same size as a pointer (i.e. its safe to cast a pointer to uintptr_t without losing information). -- Doug Rabson Mail: [EMAIL PROTECTED] Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Wed, 10 May 2000, Doug Rabson wrote: > You can suppress the warning if you cast to uintptr_t first. Pretty ugly > though. For (almost) full uglyness and correctness, you have to cast to "volatile void *" first, then back via "void *": #define unvolstructfoop(sfp) \ ((struct foo *)(void *)(uintptr_t)(volatile void *)(sfp)) For full uglyness, add an ifdef to test if uintptr_t exists (see the C99 standard), and backup methods for when it doesn't exist. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On 10-May-00 Doug Rabson wrote: > On Tue, 9 May 2000, Mike Smith wrote: > >> > On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: >> > > The only answer I've seen for this one is to kick, hard, whoever it was >> > > that added -Wcast-qual to the kernel options. >> > >> > Or we should just delete it from the options. >> >> Ugh. I don't actually like that, because it serves a valid purpose. >> What irritates me mostly is just that there is no way of casting a >> volatile object into a non-volatile type, so you can't implement any sort >> of conditional volatility exclusion. > > You can suppress the warning if you cast to uintptr_t first. Pretty ugly > though. It actually worked! Now I will go and see what this uintptr_t actually is :-) > > -- > Doug Rabson Mail: [EMAIL PROTECTED] > Nonlinear Systems Ltd.Phone: +44 20 8442 9037 > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message Sincerely Yours 404.664.6401 Simon Shapiro Research Fellow, Earthlink Inc. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Tue, 9 May 2000, Garrett Wollman wrote: > < >said: > > > So does: > > > bzero((void *)&trash, sizeof(junk_t)); > > > So, how do I make everyone happy? > > Put a comment on that line indicating that a warning is expected. Someone's ie driver has lines like this. This does not make me happy :-). There are 22 cast-qual warnings for if_ie.c in LINT error output, and I look at LINT error output a lot. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Tue, 9 May 2000, Mike Smith wrote: > > On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: > > > The only answer I've seen for this one is to kick, hard, whoever it was > > > that added -Wcast-qual to the kernel options. > > > > Or we should just delete it from the options. > > Ugh. I don't actually like that, because it serves a valid purpose. > What irritates me mostly is just that there is no way of casting a > volatile object into a non-volatile type, so you can't implement any sort > of conditional volatility exclusion. You can suppress the warning if you cast to uintptr_t first. Pretty ugly though. -- Doug Rabson Mail: [EMAIL PROTECTED] Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On 09-May-00 Mike Smith wrote: >> On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: >> > The only answer I've seen for this one is to kick, hard, whoever it was >> > that added -Wcast-qual to the kernel options. >> >> Or we should just delete it from the options. > > Ugh. I don't actually like that, because it serves a valid purpose. > What irritates me mostly is just that there is no way of casting a > volatile object into a non-volatile type, so you can't implement any sort > of conditional volatility exclusion. Agree. It is a mess. Ideally, if an object is volatile, then it should be respected as so. always. The ANSI standard is too vague on this issue and the number of poor suckers that have to have it is too small. > -- > \\ Give a man a fish, and you feed him for a day. \\ Mike Smith > \\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED] > \\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED] > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message Sincerely Yours 404.664.6401 Simon Shapiro Research Fellow, Earthlink Inc. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On 10-May-00 Marcel Moolenaar wrote: > Mike Smith wrote: >> >> Ugh. I don't actually like that, because it serves a valid purpose. >> What irritates me mostly is just that there is no way of casting a >> volatile object into a non-volatile type, so you can't implement any sort >> of conditional volatility exclusion. > > You can however use a union and have a non-volatile object aliasing a > volatile object as in: > > union u { > volatile int vi; > int nvi; > }; And you know for a fact that the compiler will generate the right code. Right? :-) Even if it did, I feel nervous. What if, in the example above, the generated code does not clear the structure on time, as indicated? What about other cases where references to volatile data are being made? Thanx for the tip, though...! > > -- > Marcel Moolenaar > mail: [EMAIL PROTECTED] / [EMAIL PROTECTED] > tel: (408) 447-4222 > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message Sincerely Yours 404.664.6401 Simon Shapiro Research Fellow, Earthlink Inc. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
At 7:08 PM -0400 5/9/00, Simon Shapiro wrote: >Given: > >typedef struct junk { >... >} junk_t > >volatile junk_t trash; > >What I want to do is zero out trash. > >bzero(trash, sizeof(junk_t)); > >produces a warning about loss of volatility. >So, how do I make everyone happy? Write a 'bzerov' function, which takes a volatile first parameter. Presumably you could just copy the source for bzero and change the 1st parameter declaration... or write a dumb 'bzerov' macro, which casts the first parameter to be pointer to volatile char, and then loops over it setting to zero one byte at a time. --- Garance Alistair Drosehn = [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Institute To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
Mike Smith wrote: > > Ugh. I don't actually like that, because it serves a valid purpose. > What irritates me mostly is just that there is no way of casting a > volatile object into a non-volatile type, so you can't implement any sort > of conditional volatility exclusion. You can however use a union and have a non-volatile object aliasing a volatile object as in: union u { volatile int vi; int nvi; }; -- Marcel Moolenaar mail: [EMAIL PROTECTED] / [EMAIL PROTECTED] tel: (408) 447-4222 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
> On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: > > The only answer I've seen for this one is to kick, hard, whoever it was > > that added -Wcast-qual to the kernel options. > > Or we should just delete it from the options. Ugh. I don't actually like that, because it serves a valid purpose. What irritates me mostly is just that there is no way of casting a volatile object into a non-volatile type, so you can't implement any sort of conditional volatility exclusion. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED] \\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
On Tue, May 09, 2000 at 04:27:10PM -0700, Mike Smith wrote: > The only answer I've seen for this one is to kick, hard, whoever it was > that added -Wcast-qual to the kernel options. Or we should just delete it from the options. -- -- David([EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: One more question (different now)
The only answer I've seen for this one is to kick, hard, whoever it was that added -Wcast-qual to the kernel options. Or write your own, suboptimal, bzero code. > Hi Again, > > Since you were so kind to me, I will impose another > one on you (the previous answers were _all_ correct! ) > > Given: > > typedef struct junk { > ... > } junk_t > > volatile junk_t trash; > > What I want to do is zero out trash. > > bzero(trash, sizeof(junk_t)); > > produces a warning about loss of volatility. > So does: > > bzero((void *)&trash, sizeof(junk_t)); > > So, how do I make everyone happy? > > Oh, the struct has to be volatile. Trust me on that one. > > > > Sincerely Yours > 404.664.6401 > Simon Shapiro Research Fellow, Earthlink Inc. > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message > > Hi Again, > > Since you were so kind to me, I will impose another > one on you (the previous answers were _all_ correct! ) > > Given: > > typedef struct junk { > ... > } junk_t > > volatile junk_t trash; > > What I want to do is zero out trash. > > bzero(trash, sizeof(junk_t)); > > produces a warning about loss of volatility. > So does: > > bzero((void *)&trash, sizeof(junk_t)); > > So, how do I make everyone happy? > > Oh, the struct has to be volatile. Trust me on that one. > > > > Sincerely Yours > 404.664.6401 > Simon Shapiro Research Fellow, Earthlink Inc. > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-current" in the body of the message > -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED] \\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
One more question (different now)
< said: > So does: > bzero((void *)&trash, sizeof(junk_t)); > So, how do I make everyone happy? Put a comment on that line indicating that a warning is expected. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same [EMAIL PROTECTED] | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
One more question (different now)
Hi Again, Since you were so kind to me, I will impose another one on you (the previous answers were _all_ correct! ) Given: typedef struct junk { ... } junk_t volatile junk_t trash; What I want to do is zero out trash. bzero(trash, sizeof(junk_t)); produces a warning about loss of volatility. So does: bzero((void *)&trash, sizeof(junk_t)); So, how do I make everyone happy? Oh, the struct has to be volatile. Trust me on that one. Sincerely Yours 404.664.6401 Simon Shapiro Research Fellow, Earthlink Inc. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message