Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
To: Aleksey Cheusov <cheusov@tut.by>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 06/27/2007 16:49:29
On Jun 27,  8:18pm, cheusov@tut.by (Aleksey Cheusov) wrote:
-- Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platfor

| 
| >  | How about about fixing
| >  |       #if __STDC__
| >  | !         ^^^^^^^^
| >  |       #define ___RENAME(x)    __asm(___STRING(_C_LABEL(x)))
| >  |       #else
| >  |       #ifdef __LEADING_UNDERSCORE
| >  |       ...
| >  | 
| >  | and 
| >  | 
| >  |       #if __STDC__
| >  | !         ^^^^^^^^
| >  |       #define __strong_alias(alias,sym)                      \
| >  |       __asm(".global " _C_LABEL_STRING(#alias) "\n"          \
| >  |       _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
| >  | 
| >  | 
| 
| >  I don't understand what to fix here....
| 
| I'm not sure that *non-standard* __asm directive can be allowed if
| __STDC__ is defined. Can you explain this?
| 
| P.S.
| It's not clear for me what things should be fixed?
| LCC itself or NetBSD includes or both?
| 
| P.S.
| Should I report PR about wip/tcc separately?
| 
| -- 
| Best regards, Aleksey Cheusov.

LCC does not support renaming from what I see. So if in cdefs.h
we just #define __RENAME(x) to nothing, the code will compile.
The problem is that it will fail to work for renamed functions.
We need to find a portable way of doing renaming for other compilers
and there seems to be none. 

christos