for (x in gcc/src/*.[chyl7s]) { # All this nonsense is simply to avoid useful and/or standard things like __FILE__ or __STDC__ */
        sed 's/__asm__//g
                s/__extension__//g
                s/__inline__//g
                s/__typeof__//g
                s/__restrict__//g
                s/__builtin_[a-zA-Z0-9_][a-zA-Z0-9_]*//g
                s/__cxa_atexit//g
                s/__cxa_get_exception_ptr//g
                s/__attribute__//g
                s/__null//g
                s/__strong//g
                s/__weak//g
                s/__int64//g' $x > $x^.new # keep going
        # note that we need a little extra work for __attribute__
        mv $x^.new $x
}

On Nov 12, 2007, at 7:59 PM, Lyndon Nerenberg wrote:


On 2007-Nov-12, at 11:39 , Steve Simon wrote:

Is the "problem" more the lack of g++ and perhaps
glibc than the gcc C compiler itself or am I
missing somthing.

I find that > 90% of the problem is code that makes use of all the __(foo)__ attribute crud in function declarations. It shouldn't be difficult to write a tool to strip that nonsense out.

Alternatively you could teach the compilers to recognize and ignore those constructs, but my personal preference is to just elide the bits from the source at import. Even ignoring them lends them more credibility than my morals allow ;-P

-lyndon

Reply via email to