> The original problem with the '.' is GAS was that tcc couldn't deal with
labels
> starting '.'

Is this change works (with your patch reverted)?

    case '.':
        /* special dot handling because it can also start a number */
        PEEKC(c, p);
        if (isnum(c)) {
            cstr_reset(&tokcstr);
            cstr_ccat(&tokcstr, '.');
            goto parse_num;
-        } else if ((isidnum_table['.' - CH_EOF] & IS_ID) != 0) { /* asm
mode */
+       } else if (parse_flags & PARSE_FLAG_ASM_FILE) { /* asm mode */
            *--p = c = '.';
            goto parse_ident_fast;


Another qiestion: what purpose of the following change?

                if (tok != TOK_STR)
                     expect("string constant");
                 next();
+                if (tok == ',') {
+                    next();
+                    if (tok == '@' || tok == '%')
+                        next();
+                    next();
+                }
             }
             last_text_section = cur_text_section;
             use_section(s1, sname);
         }
         break;

> f you do revert this change, please add a test for the SRC(y...) that
passes on mob branch.

Not so simple: a file must be a *.S and makefile changes needed



2016-03-31 1:09 GMT+03:00 Vladimir Vissoultchev <[email protected]>:

> The original problem with the '.' is GAS was that tcc couldn't deal with
> labels starting '.' like
>
> .start:
>       <<code here>>
> .end:
>
> . . . and gcc -S seem to produce lots of these.
>
> Unfortunately there is no failing test for this yet implemented so your
> revert seems to pass all tests present.
>
> If you do revert this change, please add a test for the SRC(y...) that
> passes on mob branch.
>
> cheers,
> </wqw>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Sergey
> Korshunoff
> Sent: Wednesday, March 30, 2016 11:54 PM
> To: [email protected]
> Subject: Re: [Tinycc-devel] GAS symbols
>
> > First version of the patch is attached. Please test.
> Don't works. I want to reverse '.' in asm indentifers. A patch attached,
>
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to