Re: [fossil-users] Rejected JSON tests

2016-06-01 Thread Stephan Beal
On Wed, Jun 1, 2016 at 1:00 AM, Kain Abel  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


Re: [fossil-users] Rejected JSON tests

2016-05-31 Thread Kain Abel
Hi Stephan,

again, I beg your pardon. My work ate all the time.

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).

lm@um:~/src/fossil$ uname -a
Linux um 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
lm@um:~/src/fossil$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
lm@um:~/src/fossil$ $ gcc-4.8 --version
gcc-4.8 (Ubuntu 4.8.5-4ubuntu2) 4.8.5

With best regards,
Kain
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Rejected JSON tests

2016-05-31 Thread Kain Abel
Hi Ross,

sorry for the late reply. My day job ate all the time.

Thanks for the tip.
'apt-get install tcllib' solved the problem.

Best regards and thanks,
Kain

2016-05-27 22:52 GMT+02:00 Ross Berteig :
> The issue here is that you don't have the json package installed in your
> copy of Tcl with which you are running the test harness.
>
> There is a comment in json.test that has the reminder of which json library
> I used. Specifically, I used the one from tcllib, as packaged and delivered
> by ActiveTcl's teacup utility.
>
> https://www.fossil-scm.org/index.html/artifact/65f8333164e4?txt=1=33-38
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Rejected JSON tests

2016-05-27 Thread Stephan Beal
On Fri, May 27, 2016 at 1:39 PM, Kain Abel  wrote:

>
> ./src/cson_amalgamation.c: In function ‘cson_value_new_integer’:
> ./src/cson_amalgamation.c:2863:13: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
>  *CSON_INT(c) = v;
>

Hi again Kain,

i suspect that this warning might be specific to gcc 4.4. i just tried it
on the original sources with gcc 4.8 and it does not warn there (and also
didn't with the older gcc versions it was original developed with):

[stephan@host:~/fossil/cson]$ gcc -c -pedantic -Wall -Werror -fPIC
-Wstrict-aliasing -g -std=c89 cson_amalgamation.c
[stephan@host:~/fossil/cson]$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

also tried with -std=c99.

-- 
- 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


Re: [fossil-users] Rejected JSON tests

2016-05-27 Thread Ross Berteig

On 5/27/2016 4:39 AM, Kain Abel wrote:

Dear devs, dear users,

the script tester.tcl don't like the JSON support?.

lm@um:/tmp$ tclsh /tmp/test/tester.tcl /tmp/fossil -quiet -prot
can't find package json
while executing
"package require json"
(file "/tmp/test/json.test" line 38)
invoked from within



The issue here is that you don't have the json package installed in your 
copy of Tcl with which you are running the test harness.


There is a comment in json.test that has the reminder of which json 
library I used. Specifically, I used the one from tcllib, as packaged 
and delivered by ActiveTcl's teacup utility.


https://www.fossil-scm.org/index.html/artifact/65f8333164e4?txt=1=33-38

On linux, you'll have to find your own way to get the library, IIRC I 
was able to tease it out of apt-get, but I don't recall what its name was.

--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Rejected JSON tests

2016-05-27 Thread Kain Abel
Dear devs, dear users,

the script tester.tcl don't like the JSON support?.

lm@um:/tmp$ ./fossil version -v
This is fossil version 1.35 [893905c83e] 2016-05-23 01:05:08 UTC
Compiled on May 27 2016 12:36:50 using gcc-5.3.1 20160413 (64-bit)
SQLite 3.13.0 2016-05-18 10:57:30 fc49f556e4
Schema version 2015-01-24
zlib 1.2.8, loaded 1.2.8
SSL (OpenSSL 1.0.1t  3 May 2016)
TH1_DOCS
TH1_HOOKS
TCL (Tcl 8.6.0, loaded TH_OK: 8.6.5)
USE_TCL_STUBS
TCL_PRIVATE_STUBS
JSON (API 20120713)
UNICODE_COMMAND_LINE
DYNAMIC_BUILD
lm@um:/tmp$ tclsh /tmp/test/tester.tcl /tmp/fossil -quiet -prot
can't find package json
while executing
"package require json"
(file "/tmp/test/json.test" line 38)
invoked from within
"source $testdir/$testfile.test"
("foreach" body line 3)
invoked from within
"foreach testfile $argv {
  protOut "* $testfile **"
  source $testdir/$testfile.test
  protOut "* End of $testfile: [llength $bad_test] er..."
(file "/tmp/test/tester.tcl" line 716)
lm@um:/tmp$ tail prot
test glob-parse-116.1 OK
/tmp/fossil test-glob 'o*,two' one,two
test glob-parse-117.1 OK
/tmp/fossil test-glob {'o*,two three,four'} {one two three,four}
test glob-parse-118.1 OK
/tmp/fossil test-glob {'o*,two three,four'} {one,two three,four}
test glob-parse-119.1 OK
* End of glob: 0 errors so far **
* json **
/tmp/fossil test-th-eval {hasfeature json}
lm@um:/tmp$

With regards,
Kain


How the ./fossil was configured and built:
( Would it be possible to embed the flags of the compiler and also the
whole config line in the output of ./fossil version -v (or -vv)? - For
a better differentiation of different versions and a faster
reproduction of errors.)

lm@um:~/src/fossil$ uname -a
Linux um 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
lm@um:~/src/fossil$ CFLAGS="-Os -pipe -Wall" ./configure --json
--with-openssl=tree --with-th1-hooks --with-th1-docs --with-tcl=1
--with-tcl-private-stubs=1
lm@um:~/src/fossil$ make clean && make 2> err4.log
lm@um:~/src/fossil$ cat err4.log
./src/import.c: In function ‘import_cmd’:
./src/import.c:1705:9: warning: ‘markfile_out’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 fossil_fatal("cannot open %s for writing\n", markfile_out);
 ^
./src/import.c:1667:13: warning: ‘markfile_in’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   FILE *f = fossil_fopen(markfile_in, "r");
 ^
./src/report.c: In function ‘rptview_page’:
./src/report.c:781:9: warning: ‘sState.zWikiEnd’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 @ %s(pState->zWikiEnd)
 ^
./src/report.c:1188:25: note: ‘sState.zWikiEnd’ was declared here
 struct GenerateHTML sState;
 ^
./src/report.c:775:9: warning: ‘sState.zWikiStart’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 @ 
 ^
./src/report.c:1188:25: note: ‘sState.zWikiStart’ was declared here
 struct GenerateHTML sState;
 ^
./src/report.c:779:9: warning: ‘sState.wikiFlags’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 wiki_convert(, 0, pState->wikiFlags);
 ^
./src/report.c:1188:25: note: ‘sState.wikiFlags’ was declared here
 struct GenerateHTML sState;
 ^
./src/search.c: In function ‘search_body_sqlfunc’:
./src/search.c:474:7: warning: ‘nHdr’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   int nHdr;
   ^
./src/search.c: In function ‘search_title_sqlfunc’:
./src/search.c:461:5: warning: ‘nHdr’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
 sqlite3_result_text(context, z, nHdr, SQLITE_TRANSIENT);
 ^
./src/wiki.c: In function ‘wiki_cmd’:
./src/wiki.c:1333:27: warning: ‘rid’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
 if( g.argv[2][1]=='r' && rid>0 ){
   ^
./src/cson_amalgamation.c: In function ‘cson_value_new_integer’:
./src/cson_amalgamation.c:2863:13: warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]
 *CSON_INT(c) = v;
 ^
lm@um:~/src/fossil$
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users