Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-03-15
17:52 • Ticket [639208cc7b] main makefile.vc OPTS=static compile error in libtommath\bn_... artifact: 939e83b68e user: oehhar
17:17 • Closed ticket [639208cc7b]. artifact: 1d53274293 user: jan.nijtmans
17:12
Fix [639208cc7b]: main makefile.vc OPTS=static compile error in libtommath\bn_mp_set_i64.c: An unary... check-in: 47d5aef864 user: jan.nijtmans tags: core-8-6-branch
10:53 • Ticket [639208cc7b] main makefile.vc OPTS=static compile error in libtommath\bn_... artifact: fa8ea62e41 user: jan.nijtmans
10:40 • New ticket [639208cc7b]. artifact: fc4b001ff4 user: oehhar

main makefile.vc OPTS=static compile error in libtommath\bn_mp_set_i64.c: An unary minus operator was assigned to a signless type. The result is still signless.

Closed / Fixed639208cc7b714bc0e0bb7b70b8b106b8c58c1303Created 5 years agoUpdated 5 years ago
Descriptionwiki2022-03-15 10:40:46
Following compile warning is interpret as error and compilation stops:

C:\test\tcl9.0_tip607-encoding-failindex\win\..\libtommath\bn_mp_set_i64.c(6): warning C4146: Einem vorzeichenlosen Typ wurde ein unärer Minus-Operator zugewiesen. Das Ergebnis ist weiterhin vorzeichenlos.

English translation of the German error message:

An unary minus operator was assigned to a signless type. The result is still signless.

This happened with:

  • Windows 10 64bit GER operating system
  • Visual Studio 2015 command prompt: x86 native tools
  • Command: cd win; nmake -f Makefile.vc release OPTS=noembed,symbols,static
  • Branch: [a9b94c0646], which should be identical to current main in this respect.

The addition of the static option caused this compilation issue. Without static, it does not arise.

Thank you and take care, Harald

---

P.S.: I tried the static option, as VisualStudio debugging did not work without this patch: [add9ed8887]. I already informed Ashok, if this is ok or I am just doing nonsense.

Referenced by1
  • 47d5aef864Fix [639208cc7b]: main makefile.vc OPTS=static compile error in libtommath\bn_mp_set_i64.c: An unary minus operator was assigned to a signless type. The result is still signless. check-in2022-03-15 17:12:31
jan.nijtmanswiki2022-03-15 10:53:13

This C4146 warning is a false positive, there's nothing wrong. In Tcl code this warning is disabled, but not in the libtommath code.

I'll see what I can do.

Thanks!

jan.nijtmanswiki2022-03-15 17:17:13

Fixed [here] (even for 8.6, although bn_mp_set_i64.c is not used in 8.6). Thanks!

oehharwiki2022-03-15 17:52:45

Thank you, Jan.

Tested -> all ok.

Thanks again, Harald

Log in (anonymous is fine) to add a comment.