Woverlength-strings warnings in clang 3.4 #220

issue evoskuil opened this issue on February 23, 2015
  1. evoskuil commented at 5:11 AM on February 23, 2015: contributor

    Environment:

    clang version 3.4 (tags/RELEASE_34/final)
    Target: x86_64-unknown-linux-gnu
    

    Warnings:

      CC     src/libsecp256k1_la-secp256k1.lo
    In file included from src/secp256k1.c:13:
    In file included from ./src/field_impl.h:19:
    In file included from ./src/field_5x52_impl.h:20:
    ./src/field_5x52_asm_impl.h:29:5: warning: string literal of length 3425 exceeds
          maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq 0(%%rsi),%%r10\n"
        ^~~~~~~~~~~~~~~~~~~~~~~
    ./src/field_5x52_asm_impl.h:299:5: warning: string literal of length 2541
          exceeds maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq 0(%%rsi),%%r10\n"
        ^~~~~~~~~~~~~~~~~~~~~~~
    In file included from src/secp256k1.c:14:
    In file included from ./src/scalar_impl.h:20:
    ./src/scalar_4x64_impl.h:262:5: warning: string literal of length 1191 exceeds
          maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq 32(%%rsi), %%r11\n"
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    ./src/scalar_4x64_impl.h:368:5: warning: string literal of length 821 exceeds
          maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq %q9, %%r11\n"
        ^~~~~~~~~~~~~~~~~~~
    ./src/scalar_4x64_impl.h:567:5: warning: string literal of length 1643 exceeds
          maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq 0(%%rdi), %%r15\n"
        ^~~~~~~~~~~~~~~~~~~~~~~~
    ./src/scalar_4x64_impl.h:733:5: warning: string literal of length 1383 exceeds
          maximum length 509 that C90 compilers are required to support
          [-Woverlength-strings]
        "movq 0(%%rdi), %%r11\n"
        ^~~~~~~~~~~~~~~~~~~~~~~~
    6 warnings generated.
      CCLD   libsecp256k1.la
    
  2. gmaxwell commented at 5:29 AM on February 23, 2015: contributor

    Does adding _ _ extension _ _ in front of _ _ asm _ _ (two underscores before and after, no spaces) shut it up? (really asm itself is an extension, so I think it shouldn't be warning there, but lets see if that makes it happy.)

  3. evoskuil commented at 7:12 AM on February 23, 2015: contributor

    I don't think it likes that:

    ./src/field_5x52_asm_impl.h:298:15: error: expected expression
    __extension__ __asm__ __volatile__(
                  ^
    ./src/field_5x52_asm_impl.h:287:63: warning: unused parameter 'r'
          [-Wunused-parameter]
    ...
    
  4. sipa commented at 7:21 AM on February 23, 2015: contributor

    I believe it's a known problem. Older gcc versions also complain about this.

    I guess we can just disable -Woverlength-strings for now?

  5. evoskuil commented at 7:23 AM on February 23, 2015: contributor

    Seems fine to me.

  6. evoskuil cross-referenced this on Feb 23, 2015 from issue Disable overlength-strings warnings. by evoskuil
  7. gmaxwell closed this on Apr 30, 2015

  8. istvans referenced this in commit 6af22721ca on Feb 6, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-23 01:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me