Thanks for your patch,
FYI, for Windows compatibility:

turn -fdollars-in-identifiers on by default is Ol as it also applies to cl on 
Windows (the old VMS days :o)
Also ok to remove __STDC_ISO_10646__ as is not defined on Windows too.

Please note that a conforming C11 implementation should have <uchar.h> which is 
missing on Windows includes. Among others, on Windows it defines both:

__STDC_UTF_16_ _ The integer constant 1, intended to indicate that values of 
type char16_t are UTF−16 encoded. If some other encoding is used, the macro 
shall not be defined and the actual encoding used is implementation defined.

__STDC_UTF_32_ _ The integer constant 1, intended to indicate that values of 
type char32_t are UTF−32 encoded. If some other encoding is used, the macro 
shall not be defined and the actual encoding used is implementation defined.

To make tcc more C11 compatible on Windows, I propose to add to the win32 
directory this file:

win32/include/uchar.h:

/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the TinyCC package.
 * No warranty is given; refer to the file DISCLAIMER within this package.
 */

/**
  * __STDC_UTF_16__ The integer constant 1, intended to indicate that values of 
type char16_t are UTF−16 encoded.
 */
#define __STDC_UTF_16__ 1
/**
 * __STDC_UTF_32__ The integer constant 1, intended to indicate that values of 
type char32_t are UTF−32 encoded.
 */
#define __STDC_UTF_32__ 1

 typedef unsigned short char16_t;
 typedef unsigned int char32_t;



-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Petr Skocík
Sent: Tuesday, June 11, 2019 16:41
To: tinycc-devel@nongnu.org
Subject: [Tinycc-devel] minor patches + standard compliant inline functions

Hi,

I've pushed a bunch of patches to tinycc.


The first three:

- turn -fdollars-in-identifiers on by default   (gcc/clang do it too)
- in c11 mode, skip __STDC_ISO_10646__  (was causing a redefinition
warning in simple hello world programs compiled on linux with -std=c11)
- make -h|-hh succeed if the output is successfully written

are small and should be noncontroversial.

The last one is largish and I welcome any input on it.

The issue was that tinycc's implementation of non-static inline
functions was very much nonconforming in terms of when
visible symbols would or would not be created. By looking at the at the
mailing list archive, it looks like it was discussed in 2013 but nothing
was done about it.

The supplied patch should be fixing it.

Best regards,

Petr Skocik

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to