[Top][All Lists]

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

[Tinycc-devel] Problem with TCC Assembler's constant character handling

From: Stefan Bidigaray
Subject: [Tinycc-devel] Problem with TCC Assembler's constant character handling
Date: Tue, 26 Sep 2017 15:10:44 -0400

Hi Everyone,
I'm trying to assemble a project of mine using tcc (the idea of a tiny c compiler fits perfectly with the project). The project is in x86_64 assembly, and tcc is refusing to accept constant character such as: $'A.

According to the GNU as documentation, the way to define a constant character is by adding a single quote before the character (https://sourceware.org/binutils/docs/as/Constants.html). After some quick testing, I noticed tcc only accepts a quote before and one after the character, like the C compiler ('A').

As an example, the attached file fails with:
basename.S:62: error: missing terminating ' character

If DIR_SEPARATOR is defined to '/', instead, it will assemble under tcc.

On a different, but somewhat related note, is there any reason why the .L prefix is not accepted by tcc's assembler? That's the ELF local label prefix as described here: (https://sourceware.org/binutils/docs-2.19/as/Symbol-Names.html)

I'm not a contributor, so I understand if this request is beyond the scope of tcc. I am just hoping to be able to use it to compile my project without extensive modifications.


PS: I'm not signed up to the list, so please CC me on any reply.

Attachment: basename.S
Description: Binary data

reply via email to

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