tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll"


From: lostgallifreyan
Subject: Re: [Tinycc-devel] Re: TCC:cannot find -l"xyz.dll"
Date: Tue, 7 Apr 2009 23:01:53 +0100

Joshua Phillips <address@hidden> wrote:
(07/04/2009 21:55)

>The behaviour of gcc, and therefore the behaviour, I suspect, of many other 
>projects trying to be as gcc-compatible as possible, interpret:
>file.c - C source code which musd be preprocessed
>file.cc, file.cp, file.cxx, file.cpp, file.CPP, file.c++, file.C - C++ source 
>code which must be preprocessed
>and many other suffixes (see the gcc manpage)
>

Ok, so a possible snag with the .C (which looks to me like a bad decision 
because many other and better ways to specify C++ files exist, (as do chances 
of typographical error if only case change determines difference)).

The case for using .C as C++ is weak because it can never be fully portable to 
all platforms for the simple reason that Win32 had no case sensitivity for 
filenames. Standard practise is use .cpp if you mean C++. (Or even use c++ 
where + is not a reserved character).

As TCC doesn't handle C++ anyway, and people can be expected to only attempt to 
compile C files with it, how about modifying the code in tcc.c to allow .C? 
I'll certainly be doing this in a local copy for my own use once I learn how to 
get TCC to compile itself.

    if (flags & AFF_PREPROCESS) {
        ret = tcc_preprocess(s1);
    } else if (!ext[0] || !strcmp(ext, "c")) {
        /* C file assumed */

I suggest changing "c" here to "[Cc]" assuming regexp works in C like this.

A similar change for .def to be same as .DEF would be nice though that might 
conflict with something more significant on OS's other than Win32. Extension .o 
and .O turns out not to be an issue, TCC likes both. Not tried .a and .A yet.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]