[cfe-dev] -fno-signed-char ignored

Robinson, Paul Paul_Robinson at playstation.sony.com
Fri May 22 15:16:16 PDT 2015


> I use the -fno-signed-char command line option but it has no effect:
> CHAR_MIN is not zero but -128 and I get warnings like
> 
>  warning: implicit conversion changes signedness: 'const char' to
>       'wchar_t' (aka 'unsigned short') [-Wsign-conversion]
>                         while(*cs) *s1++=*cs++;
>                                         ~^~~~~
> 
> so clearly the char type is treated as unsigned. My exact command line is
> 
> clang -c -x c -std=c11 -fno-signed-char -Weverything -D _DLL -D _DEBUG -D
> _MT -O0 -g3 *.th

I don't know the answer to this question, although the behavior you are
looking for does naively look reasonable.

> 
> And, does the 3 I write at -g3 have any effect or is it spurious?

It has no effect, clang treats it the same as -g.

> 
> 
> By the way, does anybody know how can I redirect the diagnosis to a file
> instead of stdout (or how do I change stdout itself)? I invoke clang from
> a makefile, in Windows, like
> 
> >nmake libraries.mak > buildoutput.txt
> 
> but this has no effect of the output from the compiler.

I expect the diagnostics are written to stderr not stdout and so you could do
   nmake libraries.mak 2> buildoutput.txt
to capture stderr to a file.
--paulr

> 
> Thanks in advance
> 
> -- Javier A. M.
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list