r191486 - Add -fno-unsigned-char and ignore it. We already support -fno-signed-char, add

Nick Lewycky nlewycky at google.com
Fri Sep 27 14:35:45 PDT 2013


On 27 September 2013 06:39, Richard Smith <richard at metafoo.co.uk> wrote:

> On Thu, Sep 26, 2013 at 10:06 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>
>> Author: nicholas
>> Date: Fri Sep 27 00:06:31 2013
>> New Revision: 191486
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=191486&view=rev
>> Log:
>> Add -fno-unsigned-char and ignore it. We already support
>> -fno-signed-char, add
>> both flags to the driver test.
>>
>
> Should we really be ignoring this?
>

Of course not, but this documents it as needing an implementation.

I would have thought we should look for the last of -fsigned-char,
> -fno-unsigned-char, -funsigned-char, -fno-signed-char, and pick a signed
> type unless the last flag (if any) is one of the latter two.
>
> For instance, -funsigned-char -fno-unsigned-char should probably leave
> char signed.
>

I didn't implement it because I don't know whether it undoes a
-f(un)?signed-char leaving it to the default, or if -fno-signed-char -->
-funsigned-char and -fno-unsigned-char --> -fsigned-char.

NIck


>
>
>> Modified:
>>     cfe/trunk/include/clang/Driver/Options.td
>>     cfe/trunk/test/Driver/clang_f_opts.c
>>
>> Modified: cfe/trunk/include/clang/Driver/Options.td
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=191486&r1=191485&r2=191486&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Driver/Options.td (original)
>> +++ cfe/trunk/include/clang/Driver/Options.td Fri Sep 27 00:06:31 2013
>> @@ -796,6 +796,7 @@ def fno_unroll_loops : Flag<["-"], "fno-
>>    HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
>>  def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">,
>> Group<f_Group>;
>>  def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>;
>> +def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">,
>> Group<clang_ignored_f_Group>;
>>  def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
>>  def fuse_cxa_atexit : Flag<["-"], "fuse-cxa-atexit">, Group<f_Group>;
>>  def fuse_init_array : Flag<["-"], "fuse-init-array">, Group<f_Group>,
>> Flags<[CC1Option]>,
>>
>> Modified: cfe/trunk/test/Driver/clang_f_opts.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=191486&r1=191485&r2=191486&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/Driver/clang_f_opts.c (original)
>> +++ cfe/trunk/test/Driver/clang_f_opts.c Fri Sep 27 00:06:31 2013
>> @@ -124,4 +124,6 @@
>>  // RUN:     -fno-builtin-foobar
>>       \
>>  // RUN:     -fno-builtin-strcat -fno-builtin-strcpy
>>       \
>>  // RUN:     -fno-var-tracking
>>       \
>> +// RUN:     -fno-unsigned-char
>>      \
>> +// RUN:     -fno-signed-char
>>      \
>>  // RUN:     %s
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130927/f983d63e/attachment.html>


More information about the cfe-commits mailing list