<div dir="ltr">Sorry, somehow I missed that.  Ive gone ahead and reverted this change for now (SVN r293257).</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 2:30 PM, Evgenii Stepanov <span dir="ltr"><<a href="mailto:eugeni.stepanov@gmail.com" target="_blank">eugeni.stepanov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually, the bot has been red since Jan 21 with this exact error.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jan 26, 2017 at 2:27 PM, Evgenii Stepanov<br>
<<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm not sure why we only see this now, but this change is breaking<br>
> llvm bootstrap with -Werror:<br>
> <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/732/steps/bootstrap%20clang/logs/stdio" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/<wbr>builders/sanitizer-x86_64-<wbr>linux/builds/732/steps/<wbr>bootstrap%20clang/logs/stdio</a><br>
><br>
> llvm/projects/libunwind/src/<wbr>config.h:90:41: error: token pasting of<br>
> ',' and __VA_ARGS__ is a GNU extension<br>
> [-Werror,-Wgnu-zero-variadic-<wbr>macro-arguments]<br>
>   fprintf(stderr, "libunwind: " msg "\n", ##__VA_ARGS__)<br>
><br>
> On Sat, Jan 21, 2017 at 8:22 AM, Saleem Abdulrasool via cfe-commits<br>
> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>> Author: compnerd<br>
>> Date: Sat Jan 21 10:22:55 2017<br>
>> New Revision: 292721<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292721&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=292721&view=rev</a><br>
>> Log:<br>
>> DWARF: convert error logs to _LIBUNWIND_LOG<br>
>><br>
>> Use the `_LIBUNWIND_LOG` macro instead of the explicit `fprintf` call.<br>
>> NFC.<br>
>><br>
>> Modified:<br>
>>     libunwind/trunk/src/<wbr>DwarfParser.hpp<br>
>>     libunwind/trunk/src/config.h<br>
>><br>
>> Modified: libunwind/trunk/src/<wbr>DwarfParser.hpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/DwarfParser.hpp?rev=292721&r1=292720&r2=292721&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libunwind/trunk/src/<wbr>DwarfParser.hpp?rev=292721&r1=<wbr>292720&r2=292721&view=diff</a><br>
>> ==============================<wbr>==============================<wbr>==================<br>
>> --- libunwind/trunk/src/<wbr>DwarfParser.hpp (original)<br>
>> +++ libunwind/trunk/src/<wbr>DwarfParser.hpp Sat Jan 21 10:22:55 2017<br>
>> @@ -421,8 +421,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>        offset = (int64_t)addressSpace.<wbr>getULEB128(p, instructionsEnd)<br>
>>                                                    * cieInfo.dataAlignFactor;<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_offset_extended DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_offset_extended, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg].<wbr>location = kRegisterInCFA;<br>
>> @@ -436,9 +435,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        ;<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(<br>
>> -            stderr,<br>
>> -            "malformed DW_CFA_restore_extended DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_restore_extended, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg] = initialState.savedRegisters[<wbr>reg];<br>
>> @@ -448,8 +445,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_undefined:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_undefined DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_undefined, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg].<wbr>location = kRegisterUnused;<br>
>> @@ -459,8 +455,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_same_value:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_same_value DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_same_value, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        // <rdar://problem/8456377> DW_CFA_same_value unsupported<br>
>> @@ -477,13 +472,11 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        reg2 = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_register DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_register, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        if (reg2 > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_register DWARF unwind, reg2 too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_register, reg2 too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg].<wbr>location = kRegisterInRegister;<br>
>> @@ -525,7 +518,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        offset = (int64_t)addressSpace.<wbr>getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr, "malformed DW_CFA_def_cfa DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_def_cfa, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->cfaRegister = (uint32_t)reg;<br>
>> @@ -537,9 +530,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_def_cfa_register:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(<br>
>> -            stderr,<br>
>> -            "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_def_cfa_register, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->cfaRegister = (uint32_t)reg;<br>
>> @@ -567,8 +558,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_expression:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_expression DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_expression, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg].<wbr>location = kRegisterAtExpression;<br>
>> @@ -583,9 +573,8 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_offset_extended_sf:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(<br>
>> -            stderr,<br>
>> -            "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG(<br>
>> +            "malformed DWARF DW_CFA_offset_extended_sf, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        offset =<br>
>> @@ -602,8 +591,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>        offset =<br>
>>            addressSpace.getSLEB128(p, instructionsEnd) * cieInfo.dataAlignFactor;<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_def_cfa_sf, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->cfaRegister = (uint32_t)reg;<br>
>> @@ -635,8 +623,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_val_offset_sf:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_val_offset_sf, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        offset =<br>
>> @@ -651,8 +638,7 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_val_expression:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr,<br>
>> -                "malformed DW_CFA_val_expression DWARF unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG("malformed DWARF DW_CFA_val_expression, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        results->savedRegisters[reg].<wbr>location = kRegisterIsExpression;<br>
>> @@ -673,8 +659,8 @@ bool CFI_Parser<A>::<wbr>parseInstructions(A<br>
>>      case DW_CFA_GNU_negative_offset_<wbr>extended:<br>
>>        reg = addressSpace.getULEB128(p, instructionsEnd);<br>
>>        if (reg > kMaxRegisterNumber) {<br>
>> -        fprintf(stderr, "malformed DW_CFA_GNU_negative_offset_<wbr>extended DWARF "<br>
>> -                        "unwind, reg too big\n");<br>
>> +        _LIBUNWIND_LOG(<br>
>> +            "malformed DWARF DW_CFA_GNU_negative_offset_<wbr>extended, reg too big");<br>
>>          return false;<br>
>>        }<br>
>>        offset = (int64_t)addressSpace.<wbr>getULEB128(p, instructionsEnd)<br>
>><br>
>> Modified: libunwind/trunk/src/config.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/config.h?rev=292721&r1=292720&r2=292721&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libunwind/trunk/src/<wbr>config.h?rev=292721&r1=292720&<wbr>r2=292721&view=diff</a><br>
>> ==============================<wbr>==============================<wbr>==================<br>
>> --- libunwind/trunk/src/config.h (original)<br>
>> +++ libunwind/trunk/src/config.h Sat Jan 21 10:22:55 2017<br>
>> @@ -87,7 +87,7 @@<br>
>>    } while (0)<br>
>><br>
>>  #define _LIBUNWIND_LOG(msg, ...)                                               \<br>
>> -  fprintf(stderr, "libunwind: " msg "\n", __VA_ARGS__)<br>
>> +  fprintf(stderr, "libunwind: " msg "\n", ##__VA_ARGS__)<br>
>><br>
>>  #if defined(_LIBUNWIND_HAS_NO_<wbr>THREADS)<br>
>>    // only used with pthread calls, not needed for the single-threaded builds<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div>