Issue 10 in glyphy: including glyphy-freetype.h as extern "C" in C++ causes casting errors

40 views
Skip to first unread message

gly...@googlecode.com

unread,
Jan 21, 2014, 4:44:54 AM1/21/14
to gly...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 10 by brian.he...@gmail.com: including glyphy-freetype.h as
extern "C" in C++ causes casting errors
http://code.google.com/p/glyphy/issues/detail?id=10

What steps will reproduce the problem?
1. make a main.cpp with extern "C" { #include <glyphy-freetype.h> }
2. build main.cpp with clang

What is the expected output? What do you see instead?

clang reports a number of warnings, all implicit type narrowing errors:

In file included from ../src/main.cpp:14:
/usr/local/include/glyphy/glyphy-freetype.h:43:24: error:
non-constant-expression cannot be narrowed from type 'FT_Pos' (aka 'long')
to 'double' in initializer list [-Wc++11-narrowing]
glyphy_point_t p1 = {to->x, to->y};

I expect there to be no casting errors.

What version of the product are you using? On what operating system?

// $ uname -a
Darwin 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

// file: config.h
#define PACKAGE_STRING "glyphy 0.2.0"

// $ clang++ -v
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Please provide any additional information below.



--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

gly...@googlecode.com

unread,
Apr 10, 2014, 6:53:17 PM4/10/14
to gly...@googlegroups.com

Comment #1 on issue 10 by behdad.e...@gmail.com: including
glyphy-freetype.h as extern "C" in C++ causes casting errors
http://code.google.com/p/glyphy/issues/detail?id=10

Can you please submit a patch to add explicit casts for those? Thanks.

gly...@googlecode.com

unread,
May 8, 2015, 7:25:22 PM5/8/15
to gly...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 10 by beh...@google.com: including glyphy-freetype.h as
extern "C" in C++ causes casting errors
https://code.google.com/p/glyphy/issues/detail?id=10

Fixed. Thanks.
Reply all
Reply to author
Forward
0 new messages