Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) |
| Date | 2011-06-04 08:06 +0200 |
| Organization | lccwin |
| Message-ID | <isci0a$cha$1@speranza.aioe.org> (permalink) |
| References | (5 earlier) <94qhgrFbjiU1@mid.individual.net> <d8ef521b-0d81-48a2-a9c7-b6d1a8b49c18@r33g2000prh.googlegroups.com> <e55c4f7b-827b-4136-8d50-eeecb473c3c1@f11g2000vbx.googlegroups.com> <5dfe258f-9f3f-4705-8d45-04590a9e7793@s41g2000prb.googlegroups.com> <yI-dnRSTQPbHXnTQnZ2dnUVZ_rSdnZ2d@posted.internetamerica> |
Le 04/06/11 07:32, Gordon Burditt a écrit : >>> The same issue occurs with the Microsoft C Runtime and C99 printf >>> support. You can compile 'printf( "%lu %zu\n", sizeof (int), sizeof >>> (int) );' with gcc -std=c99 in the MinGW environment, but because it >>> links in the Microsoft Runtime, the printf statement just generates "4 >>> zu". Similar problems occur for modifiers 't' and 'll'. >> >> Which raises the question - why do we do that? Is there some reason >> why the compilers never seem to supply the equivalent of libc? Sure, > > The interfaces between libc and the rest of the OS (not the interface > between libc and the user program) may not be documented and changes > may not be announced. (I'm thinking especially of the syscall > interface to the kernel). This isn't too bad if the OS version of > libc is open-source, but the compiler vendor needs to track OS > changes. Someone who tries to duplicate that may be operating in > constant catch-up mode to keep up with the changes. The OS developers > figure that THEY are in charge of libc and if they make a change > that stays compatible (e.g. a matching libc/kernel change that won't > affect dynamic-linked programs, which works great unless you try > to use an OLD libc on a NEW kernel or vice-versa) they aren't going > to worry about that other libc some compiler vendor added. > > This is less of an issue with math functions, *printf, and the > string library and such since they usually don't have much of an > interface with the kernel in areas where changes occur. > Exactly, and those functions should be provided by the compiler, not the OS. > However, it's a problem trying to replace *PART* of libc. > Things also tend to go very badly if you try to link to multiple > versions of the same library. > This is absolutely no problem if the linker links to a compiler version of the libc that THEN calls the OS libc if necessary. > >> there are going to be instances where one can get away with using the >> native OS libc, but clearly there are lots of other cases where it >> doesn't work out so well. And I would wager it works out less and >> less well as the target OS ages. > > I can see problems where the OS (and its version of libc) is young > enough to be under active development. > Bogus, since the libc interfaces didn't change since C89 in most cases.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-02 13:52 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Nobody <nobody@nowhere.com> - 2011-06-02 22:16 +0100
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-02 14:18 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-02 14:37 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-03 09:59 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-02 15:18 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-03 10:35 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-02 16:01 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) ImpalerCore <jadill33@gmail.com> - 2011-06-03 06:45 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-03 12:13 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) jacob navia <jacob@spamsink.net> - 2011-06-03 21:35 +0200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-04 08:48 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Nobody <nobody@nowhere.com> - 2011-06-03 23:28 +0100
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) gordonb.myhxj@burditt.org (Gordon Burditt) - 2011-06-04 00:32 -0500
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) jacob navia <jacob@spamsink.net> - 2011-06-04 08:06 +0200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) gordonb.c5zg9@burditt.org (Gordon Burditt) - 2011-06-04 22:03 -0500
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-05 15:47 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) jacob navia <jacob@spamsink.net> - 2011-06-05 09:48 +0200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-05 20:22 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) jacob navia <jacob@spamsink.net> - 2011-06-05 15:59 +0200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) "Joel C. Salomon" <joelcsalomon@gmail.com> - 2011-06-06 09:09 -0400
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) jacob navia <jacob@spamsink.net> - 2011-06-06 15:24 +0200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-06 10:17 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-07 07:46 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-09 09:35 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Keith Thompson <kst-u@mib.org> - 2011-06-09 11:18 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) David Mathog <dmathog@gmail.com> - 2011-06-09 12:52 -0700
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Ian Collins <ian-news@hotmail.com> - 2011-06-10 09:14 +1200
Re: OT: missing C99 math pieces in gcc 4.x on Solaris 8 (sparc) Keith Thompson <kst-u@mib.org> - 2011-06-02 16:04 -0700
csiph-web