Skip to content

-Wall causes massive compilation slowdown #105959

Open
@mikulas-patocka

Description

@mikulas-patocka

Download an example file from:
http://www.jikos.cz/~mikulas/testcases/clang/ipret.e
(the file comes from Ajla, https://www.ajla-lang.cz/ )

If you compile it with
$ time clang-20 -c -x c ipret.e -O2
it takes 23 seconds

If you compile it with
$ time clang-20 -c -x c ipret.e -O2 -Wall
it takes 31 minutes

I tested it with clang-20 from Debian Sid. On clang-18 and older, it takes a long time to compile the file even without -Wall, but the -Wall switch makes it twice worse.

Also, note that while clang-19 and clang-20 compile faster than clang-18, the code generated by clang-19 and clang-20 for this file is inferior to the code generated by clang-18 and older.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:analysisclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyslow-compile

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions