tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Small patch


From: grischka
Subject: Re: [Tinycc-devel] Small patch
Date: Thu, 31 Jan 2013 14:53:42 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Thomas Preud'homme wrote:
Maybe we should just put bcheck.o into libtcc1.a (and thus make via
the rules of lib/Makefile).  Unless there is a reason why we
shouldn't.

Yes but that doesn't change the general assumption that we are compiling tcc with gcc. If --cc is specified at configure time, then CFLAGS and CPPFLAGS should be set when running make (make CPPFLAGS=foo CFLAGS=bar)

Sure, but if you want to solve the --cc=tcc/clang problem then the
question with using what compiler for libtcc1.a needs to be answered,
and also whether it makes sense to treat bcheck.o separately.

Well, the test at the top of the function suggested me name could be NULL. I suppose it can't be NULL when the symbol is global or common. What about a malformed elf file?

Are you sure that putting an hash link to an not-existing name entry
is the right way to deal with a malformed elf file?

             boolean.t = VT_BOOL;

+            boolean.ref = 0;
Also redundant because type.ref is used with type.t = VT_FUNC only.

I'm not completely opposed to make this look more solid but then
such patch should address the problem systematically such that the
code becomes smaller, not bigger.

Can you develop about what you have in mind?

No, I just suspect.  There is mostly always a better way than
to "copy & paste" equivalent statements into several places, the
more if the statements are altogether logically redundant.

Same with
        pstrcpy(buf, sizeof buf, "a.out");
Because "a.out" cannot overflow buf[1024].

sprintf could be used  then to save some space

I pushed some changes to that.

--- grischka




reply via email to

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