From: Isaac Dunham <idunham@lavabit.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH/RFC] inline cleanup/C89 support
Date: Fri, 31 Aug 2012 12:27:53 -0700 [thread overview]
Message-ID: <20120831122753.2f5b67d8@newbook> (raw)
In-Reply-To: <20120831083418.GO1104@port70.net>
On Fri, 31 Aug 2012 10:34:18 +0200
Szabolcs Nagy <nsz@port70.net> wrote:
> * Isaac Dunham <idunham@lavabit.com> [2012-08-30 15:45:34 -0700]:
> > On Fri, 24 Aug 2012 09:53:16 +0200
> > Szabolcs Nagy <nsz@port70.net> wrote:
> > > this won't work with c++, nor old strict c compilers
> > > without __inline and __restrict and can break various
> > > c parsing tools (ctags, swig, various lints, ..)
> >
> > 1. Do any of these "old strict c compilers" exist on Linux?
>
> yes
> (eg sdcc for microcontrollers, plan9 cc used for the go runtime)
sdcc is not relevant: it doesn't link against the system libc, so it
shouldn't use system headers.
I thought I heard plan9 cc used its own libc?
> > 2. Have you tested those C parsing tools? Have they been updated to
> > support C99?
> >
> i used some of them, i know ctags handles __restrict
> while swig (1.3) does not
>
> many of the c (and c++) parsing tools dont do correct
> preprocessing or don't define all the macros like
> __STDC_VERSION__ so even if c99 grammar is mostly
> supported i wouldnt be surprised if doxygen or indent
> or similar tools had problems with __restrict
Ah.
> > If it is a realistic combination (can produce a working hello
> > world), then it *might* be worth supporting.
>
> the headers are not only for compiling musl
But they are only for compiling *against* musl (ie, if it uses its own
libc or cannot produce working binaries linked against musl, it
shouldn't be using musl headers).
> of course glibc uses __restrict so it should work
> most of the time
In case you didn't notice, this patch addresses uses __inline if
pre-c99 C is used, and __restrict is not involved. __restrict is
something that does need to be considered, however.
next prev parent reply other threads:[~2012-08-31 19:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 5:07 compatability: bits/syscall.h requires C99 idunham
2012-08-23 6:11 ` [PATCH] Problem is static inline idunham
2012-08-23 6:20 ` [PATCH 2/1] " idunham
2012-08-23 6:43 ` Szabolcs Nagy
2012-08-23 6:51 ` [PATCH] " Szabolcs Nagy
2012-08-23 12:18 ` Rich Felker
2012-08-23 12:31 ` compatability: bits/syscall.h requires C99 John Spencer
2012-08-23 12:34 ` Rich Felker
2012-08-24 0:25 ` Isaac Dunham
2012-08-24 2:07 ` Rich Felker
2012-08-24 2:34 ` Rich Felker
2012-08-24 3:31 ` [PATCH/RFC] __inline for C89 compilers (take 3?) Isaac Dunham
2012-08-24 7:53 ` compatability: bits/syscall.h requires C99 Szabolcs Nagy
2012-08-30 22:45 ` [PATCH/RFC] inline cleanup/C89 support Isaac Dunham
2012-08-31 8:34 ` Szabolcs Nagy
2012-08-31 19:27 ` Isaac Dunham [this message]
2012-09-02 16:51 ` Rich Felker
2012-09-04 15:49 ` philomath
2012-09-04 17:44 ` Rich Felker
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=20120831122753.2f5b67d8@newbook \
--to=idunham@lavabit.com \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).