Skip to content

Makefile requires c89 but test.c doesn't comply with that standard #8

Description

@SeanHeelan
$ make
cc -std=c89 -pedantic -Wall -Wextra -Werror -ggdb3 -O0 -c test.c -o test.o
test.c: In function ‘test_fill_with_deleted_items’:
test.c:201:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for (int i = 0; i < 8; ++i)
     ^~~
test.c:201:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
make: *** [Makefile:7: test.o] Error 1
$ cc --version
cc (GCC) 8.2.1 20181011 (Red Hat 8.2.1-4)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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