Re: [RFC] New pragma exec_charset

2017-10-24 Thread Andreas Krebbel
On 10/24/2017 05:33 PM, Martin Sebor wrote: >>> My concern with this pragma/attribute and inlining has to do with >>> strings in one exec charset being propagated into functions that >>> operate on strings in another charset. E.g., like in the test >>> case below that's "miscompiled" with your

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Martin Sebor
My concern with this pragma/attribute and inlining has to do with strings in one exec charset being propagated into functions that operate on strings in another charset. E.g., like in the test case below that's "miscompiled" with your patch -- the first test for n == 7 is eliminated and the

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Andreas Krebbel
On 10/23/2017 06:14 PM, Martin Sebor wrote: ... > It seems to me that before exposing a new mechanism to control > the exec charset it would be prudent to a) plug at least the > biggest holes to make the feature more reliable (in my mind, > that's at least -Wformat), and b) make sure the pragma

Re: [RFC] New pragma exec_charset

2017-10-23 Thread Martin Sebor
On 10/23/2017 04:55 AM, Andreas Krebbel wrote: On 10/19/2017 07:13 PM, Martin Sebor wrote: On 10/19/2017 09:50 AM, Andreas Krebbel wrote: The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries

Re: [RFC] New pragma exec_charset

2017-10-23 Thread Andreas Krebbel
On 10/19/2017 07:13 PM, Martin Sebor wrote: > On 10/19/2017 09:50 AM, Andreas Krebbel wrote: >> The TPF operating system uses the GCC S/390 backend. They set an >> EBCDIC exec charset for compilation using -fexec-charset. However, >> certain libraries require ASCII strings instead. In order to

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Richard Biener
On Fri, Oct 20, 2017 at 1:34 PM, Richard Biener wrote: > On Fri, Oct 20, 2017 at 1:19 PM, Andreas Krebbel > wrote: >> On 10/20/2017 10:28 AM, Richard Biener wrote: >>> On Fri, Oct 20, 2017 at 9:53 AM, Jakub Jelinek wrote:

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Richard Biener
On Fri, Oct 20, 2017 at 1:19 PM, Andreas Krebbel wrote: > On 10/20/2017 10:28 AM, Richard Biener wrote: >> On Fri, Oct 20, 2017 at 9:53 AM, Jakub Jelinek wrote: >>> On Fri, Oct 20, 2017 at 09:48:38AM +0200, Richard Biener wrote: How does it work

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Andreas Krebbel
On 10/20/2017 10:28 AM, Richard Biener wrote: > On Fri, Oct 20, 2017 at 9:53 AM, Jakub Jelinek wrote: >> On Fri, Oct 20, 2017 at 09:48:38AM +0200, Richard Biener wrote: >>> How does it work semantically to have different exec charsets? That is, >>> if "strings" flow from a

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Richard Biener
On Fri, Oct 20, 2017 at 9:53 AM, Jakub Jelinek wrote: > On Fri, Oct 20, 2017 at 09:48:38AM +0200, Richard Biener wrote: >> How does it work semantically to have different exec charsets? That is, >> if "strings" flow from a region with one -fexec-charset setting to a region >>

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Jakub Jelinek
On Fri, Oct 20, 2017 at 09:48:38AM +0200, Richard Biener wrote: > How does it work semantically to have different exec charsets? That is, > if "strings" flow from a region with one -fexec-charset setting to a region > with another one is that undefined behavior? Do we now require > external

Re: [RFC] New pragma exec_charset

2017-10-20 Thread Richard Biener
On Thu, Oct 19, 2017 at 7:13 PM, Martin Sebor wrote: > On 10/19/2017 09:50 AM, Andreas Krebbel wrote: >> >> The TPF operating system uses the GCC S/390 backend. They set an >> EBCDIC exec charset for compilation using -fexec-charset. However, >> certain libraries require ASCII

Re: [RFC] New pragma exec_charset

2017-10-19 Thread Joseph Myers
On Thu, 19 Oct 2017, Andreas Krebbel wrote: > gcc/testsuite/gcc.dg/pragma-exec_charset-1.c | 26 +++ I'd expect a c-c++-common test rather than a C-specific one, given there are significant differences in how the C and C++ front ends handle lexing. > +#pragma GCC

Re: [RFC] New pragma exec_charset

2017-10-19 Thread Martin Sebor
On 10/19/2017 09:50 AM, Andreas Krebbel wrote: The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries require ASCII strings instead. In order to be able to put calls to that library into the normal

[RFC] New pragma exec_charset

2017-10-19 Thread Andreas Krebbel
The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries require ASCII strings instead. In order to be able to put calls to that library into the normal code it is required to switch the exec charset