Issue 19 in libfixmath: compiler error after setting #define FIXMATH_NO_OVERFLOW

13 views
Skip to first unread message

libfi...@googlecode.com

unread,
Jan 18, 2013, 9:13:31 AM1/18/13
to libfi...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 19 by mozzarel...@lycos.com: compiler error after setting #define
FIXMATH_NO_OVERFLOW
http://code.google.com/p/libfixmath/issues/detail?id=19

What steps will reproduce the problem?
1. Use the Wiring IDE
2. Copy the libfixmath source code to a folder named libfixmath
2b. Copy the libfixmath folder to the 'libraries' folder in your Wiring
Sketches folder.
3. Add the header file: compilerSettings.h (see attachment) to the
libfixmath folder.
4. Add #include "compilerSettings.h" to the beginning of every header file
in the lib math source code
(You ask why? Because I don't know how else to set these compiler options
in Wiring. To my knowledge this should work)
6. Start a new wiring sketch and add #include <fixmath.h> at the top
7. uncomment the compiler setting //#define FIXMATH_NO_OVERFLOW in
compilerSettings.h
8. Click Verify in The Wiring IDE

What is the expected output?
Successful compilation

What do you see instead?
error: libfixmath/fix16.hpp: In member function 'const Fix16
Fix16::sadd(const Fix16&) const':
libfixmath/fix16.hpp:57: error: 'fix16_sadd' was not declared in this scope

plus similar errors for fix16_smul and fix16_sdiv.

What version of the product are you using? On what operating system?
Wiring version 100. Libfixmath version: can not find version info.
downloaded the zip end of januari. OS: OSX

Please provide any additional information below.


Attachments:
compilerSettings.h 402 bytes

libfi...@googlecode.com

unread,
Jan 18, 2013, 12:37:36 PM1/18/13
to libfi...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 19 by Petteri.Aimonen: compiler error after setting
#define FIXMATH_NO_OVERFLOW
http://code.google.com/p/libfixmath/issues/detail?id=19

The issue seems to be that fix16.hpp always has the sdiv/smul operations in
it. They should be put inside #ifndef FIXMATH_NO_OVERFLOW

libfi...@googlecode.com

unread,
Jan 28, 2013, 10:56:09 AM1/28/13
to libfi...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 19 by Petteri.Aimonen: compiler error after setting
#define FIXMATH_NO_OVERFLOW
http://code.google.com/p/libfixmath/issues/detail?id=19

This issue was closed by revision r87.

Reply all
Reply to author
Forward
0 new messages