Skip to content

Error making on macOS 12.3.1 #76

@nikiforidi

Description

@nikiforidi

Running make -f Makefile.osx :

cc -c  -Wall -Wextra -Wstrict-prototypes -Wshadow -Wpointer-arith -Wformat-security -Winit-self -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Wredundant-decls -Werror -O3 -funsigned-char -Iinclude/ -DUSE_STACK_SIZE=102400 -oobj/extern_md5.o src/extern_md5.c
src/extern_md5.c:250:16: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
                        if (!((data - (const md5_byte_t *)0) & 3)) {
                                    ^ ~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/extern_md5.o] Error 1

GCC version:

gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I'm a newbie in C, but could it somehow relate to Apple M1 chip or a gcc version?

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