<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 17, 2020 at 8:13 PM Javier Múgica via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Kleckner,<br>
<br>
Your answer is very good. Thank you very much for it. You have made me clear what I was doubtful or ignorant about better than I could have expected.<br>
<br>
1. Regarding -funsigned-char.<br>
<br>
A minimum example also works for me, but I am sure I got those warnings, so I wet through it and here is a different kind of minimum example:<br>
<br>
typedef unsigned char char8_t;<br>
<br>
int func(const char8_t *s){return 0;}<br>
int main(void){ <br>
        char8_t *s="Some text"; //-Wpointer-sign<br>
        return func("Some text"); //-Wpointer-sign<br>
}<br>
<br>
As you can see, the bug is restricted to the type Clang assigns to string literals. Curiously, now I have not been able to set the compilation flags in such a way that the warning does not show up, the --target does not seem to have any effect, but when I compile my code in Linux the warnings do not appear (and they have not been turned off).<br></blockquote><div>This might just be bad message text. "char" is never the same type as "signed char" or "unsigned char", so that there is a warning is intended.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
3. " Making objects static ..." .<br>
<br>
Yes, I know, I made them static on the purpose.<br>
<br>
4. "fms-compatibility is the set of compatibility hacks that we would prefer to avoid"<br>
<br>
You could not have explained it better. Fortunately, I turns out that I don't need those hacks for my code to compile, whatever they be.<br>
<br>
<br>
Regards<br>
<br>
-- Javier A. Múgica<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>