Skip to content

[Bug]: sed/gawk does not compile under clang-21 #7642

@j2kun

Description

@j2kun

What happened?

clang version 21.1.8

In file included from external/sed+/sed/compile.c:19:
In file included from external/sed+/sed/sed.h:25:
external/sed+/sed/utils.h:30:3: error: expected function body after function declarator
   30 |   _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2);
      |   ^
external/sed+/sed/utils.h:42:38: error: expected function body after function declarator
   42 |                    const char *mode) _GL_ARG_NONNULL ((1, 2, 3, 4));
      |                                      ^
external/sed+/sed/compile.c:263:9: error: call to undeclared function 'panic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  263 |         panic ("Called savchar with unexpected pushback (%x)",
      |         ^
external/sed+/sed/compile.c:1623:13: error: call to undeclared function 'panic'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1623 |             panic (_("can't find label for jump to `%s'"), go->name);

Not sure what to do here. @UebelAndre would it make sense to disable -Wimplicit-function-declaration in the BUILD file for the sed module?

Version

Development (host) and target OS/architectures:

Output of bazel --version: 8.4.0

Version of relevant rules from the WORKSPACE or MODULE.bazel file:

Language(s) and/or frameworks involved:

How to reproduce

Minimal MODULE.bazel

module(name = "sed_test")

bazel_dep(name = "rules_cc", version = "0.2.13")
bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.5.7")

register_toolchains("@toolchains_llvm_bootstrapped//toolchain:all")

bazel_dep(name = "sed", version = "4.9.bcr.3")

Then

bazel build @sed

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions