Skip to content

Won't compile with GCC 15 (with default options) #43

Description

@rostislav-nikitin

Problem
GCC versions before GCC 15 defaulted to the GNU C89 standard (-std=gnu89 or similar), which still allowed the old-style syntax for backward compatibility. With GCC 15, the default has changed to C23 (-std=gnu23), where the old syntax is no longer valid. Code using this style will now cause a compilation error.

/* Old-style function definition */
int max(a, b)
int a, b;
{
return a > b ? a : b;
}

Fix
Use compiler option: -std=gnu89

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions