On Wed, Jun 1, 2016 at 1:00 AM, Kain Abel <isoru...@gmail.com> wrote:

> I've slightly modified your line from the top:
> lm@um:~/src/fossil$ gcc -c -pedantic -I./src -Wall -Werror -fPIC
> -Wstrict-aliasing -g -Wno-long-long -std=c89 ./src/cson_amalgamation.c
> -DFOSSIL_ENABLE_JSON -Og
> lm@um:~/src/fossil$ gcc -c -pedantic -I./src -Wall -Werror -fPIC
> -Wstrict-aliasing -g -Wno-long-long -std=c89 ./src/cson_amalgamation.c
> -DFOSSIL_ENABLE_JSON -O1
> lm@um:~/src/fossil$ gcc -c -pedantic -I./src -Wall -Werror -fPIC
> -Wstrict-aliasing -g -Wno-long-long -std=c89 ./src/cson_amalgamation.c
> -DFOSSIL_ENABLE_JSON -O2
> ./src/cson_amalgamation.c: In function ‘cson_value_new_integer’:
> ./src/cson_amalgamation.c:2863:13: error: dereferencing type-punned
> pointer will break strict-aliasing rules [-Werror=strict-aliasing]
>              *CSON_INT(c) = v;
>              ^
> cc1: all warnings being treated as errors
> lm@um:~/src/fossil$ gcc -c -pedantic -I./src -Wall -Werror -fPIC
> -Wstrict-aliasing -g -Wno-long-long -std=c89 ./src/cson_amalgamation.c
> -DFOSSIL_ENABLE_JSON -Os
> ./src/cson_amalgamation.c: In function ‘cson_value_new_integer’:
> ./src/cson_amalgamation.c:2863:13: error: dereferencing type-punned
> pointer will break strict-aliasing rules [-Werror=strict-aliasing]
>              *CSON_INT(c) = v;
>              ^
> cc1: all warnings being treated as errors
>
> The same thing happens with a GCC 4.8 by the switching of the
> optimizer flags (or to -std=c99).
>

aha! i will take a look at it as soon as i am capable of emacsing with 2
hand again. i'm not sure how that can be resolved without fundamental code
changes, as it's a side-effect of allocating a cson_value and integer in
the same block of memory (that macro accesses the integer part of that
memory block).


-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to