8000 Compiler warnings on strict aliasing · Issue #27 · barnson/miniz · GitHub
[go: up one dir, main page]

Skip to content

Compiler warnings on strict aliasing #27

Open

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. gcc -Wall -Werror -O2 miniz.c
2.
3.

What is the expected output? What do you see instead?
Expected output: Compiler errors due to no main().
Actual output:
Compiler errors due to type punning.
miniz.c: In function ‘tdefl_find_match’:
miniz.c:2270:3: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
miniz.c:2282:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
miniz.c:2282:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
miniz.c:2282:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
miniz.c:2294:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
miniz.c: In function ‘tdefl_compress_fast’:
miniz.c:2367:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]

What version of the product are you using? On what operating system?
9.1.15, all MINIZ_NO_* enabled. Linux Mint 15, AMD64, GCC 4.7.3-1ubuntu1.

Please provide any additional information below.
Disabling warnings, optimization, or both, makes this go away.

Original issue reported on code.google.com by blub...@gmail.com on 24 Nov 2013 at 5:02

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0