2382 Commits

Author SHA1 Message Date
Joel de Guzman 999d031b5d Merge pull request #162 from davidlt/fix-undefined-behavior-load_little_endian-11726
[develop] Fix undefined behavior in ../support/detail/endian/endian.hpp (#11726)
2015-10-20 22:30:12 +08:00
David Abdurachmanov 86705a50af Fix undefined behavior in ../support/detail/endian/endian.hpp (#11726)
Undefined behavior sanitizer (UBSan) with GCC 5.1.1 complains about left
shifting of negative value at run-time. This happens once
boost::spirit::detail::load_little_endian is used with a singed type.

The patch resolves the issue by using unsigned type for making left shifts,
then load_little_endian casts it to specific type T.

Tested with Clang and GCC locally (test case in #11726) and all worked fine.
Tested by running all Boost test cases before and after, no regressions.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2015-10-19 07:46:57 +00:00
Jürgen Hunold 534cf39f15 Fix: use boost::none global instance instead of constructing it ourselves.
Fixes regression introduce by Boost.Optional in
9f8dd573866a48938d53eab8eade1de41e62a6b1
2015-10-05 10:33:15 +02:00
Joel de Guzman ee39bf566b Merge pull request #158 from Flast/variadic-fusion
Support variadic fusion.
2015-09-27 20:42:29 +08:00
Romain Geissler adb0a92f50 Fix "unused locally defined typedef" in parse_tree.hpp 2015-09-23 11:58:14 +02:00
Jürgen Hunold 90027e6a8e Fix: remove extraneous 'typename'
Defect introduced by new code in a4f9ea9d58
2015-09-08 20:53:58 +02:00
Joel de Guzman cc9d51bd2a Merge pull request #154 from stac47/fix_local_typdef
Fix local typedef definition warning
2015-09-07 19:57:16 +08:00
Laurent Stacul 502f4b9048 Fix local typedef definition warning 2015-09-07 11:16:00 +02:00
tobias-loew a4f9ea9d58 reenabled support for BOOST_FUSION_ADAPT_ADT adapted structs
since commit 69cc537038 (hkaiser hkaiser
authored on 7 Nov 2009) spirit support BOOST_FUSION_ADAPT_ADT adapted
structs was broken
2015-08-31 10:17:25 +02:00
Adrian Vogelsgesang 7924736c8b X3: set handles_container for expect directive 2015-08-20 00:31:29 +02:00
Sergiu Dotenco ccb7d5c60d fixed type conversion warnings 2015-08-15 10:16:17 +02:00
Joel de Guzman 299687301a Merge pull request #146 from biocomp/patch-2
Fixing race condition on static init
2015-08-12 16:52:18 +08:00
Artem Tokmakov d86378252b Updated to use compile-time constants
Tried to minimize included headers (thus no boost::integral_const and constexpr_int). 
Enum won't work for static constant for long long type, when it's not built-in (well, at least this is my understanding).
2015-08-11 00:13:22 -07:00
Adrian Vogelsgesang a362319f36 X3: fix char_range boundaries
ticket: https://svn.boost.org/trac/boost/ticket/11531
2015-08-09 15:37:48 +02:00
Artem 2ec49b0177 Fixing race condition on static init
Static variables depend on each other and when static init is not thread-safe, this leads to race condition and failures. Ticket: https://svn.boost.org/trac/boost/ticket/11514
2015-08-05 10:48:03 -07:00
Lee Clagett e16bec0aef Fixed bug in karma::duplicate attribute reporting 2015-07-30 23:30:33 -04:00
Joel de Guzman 5bc397c295 Merge pull request #140 from Lastique/patch-1
Fix signed/unsigned mismatch warning on gcc.
2015-07-27 21:01:34 +08:00
Lee Clagett e09cc45812 Fixed modifier bug with karma::left_align 2015-07-20 22:57:03 -04:00
Joel de Guzman 9c5dd09880 Merge branch 'master' into develop 2015-07-15 06:38:56 +08:00
Lee Clagett a18c25b40d Unitialized data fix 2015-07-14 15:44:37 -04:00
Andrey Semashev eb1a197673 Fix signed/unsigned mismatch warning on gcc. 2015-07-14 10:56:18 +03:00
Andrey Semashev b61bf56940 Fix signed/unsigned mismatch warning on gcc. 2015-07-14 10:45:36 +03:00
MaksimMyasnikov 12db838af3 https://svn.boost.org/trac/boost/ticket/7161 2015-07-14 01:05:18 +03:00
MaksimMyasnikov f99fcf76c0 https://svn.boost.org/trac/boost/ticket/9456
https://svn.boost.org/trac/boost/ticket/9457
2015-07-14 00:48:19 +03:00
Joel de Guzman 2df3b8885c Merge pull request #110 from mlang/x3/error_handler.position_of
Allow retrieval of the iterator_range of a position_tagged.
2015-07-09 06:42:57 +08:00
Joel de Guzman 949e499798 Merge pull request #132 from bebuch/develop
return type via decltype(auto)
2015-07-07 08:02:07 +08:00
Mario Lang b42df6fe50 X3: Fix parse_sequence with variant_attribute. 2015-07-06 23:12:48 +02:00
Benjamin Roland Buch 5dadb838ce return type via decltype(auto) 2015-07-05 17:28:54 +02:00
Benjamin Roland Buch 509029d24a remove include duplicate 2015-07-04 17:10:30 +02:00
Kohei Takahashi a727400a2e Remove undocumented fusion::void_ usage. 2015-06-30 01:21:26 +09:00
Kohei Takahashi 4d8899fdfe Remove use of deprecated fusion::vectorN. 2015-06-30 01:04:20 +09:00
Mario Lang 9b0daf9cc1 X3: Less is more. 2015-06-26 14:52:59 +02:00
Mario Lang 20ecf739f0 Fix some typos in docs and comments. 2015-06-24 20:45:54 +02:00
Mario Lang d109f01de9 X3: We do not need integer_sequence.hpp. 2015-06-24 12:20:40 +02:00
Mario Lang 090e7a056e X3: Simplify operator>. 2015-06-23 09:48:51 +02:00
Mario Lang 391cbb2f27 X3: Use decltype instead of result_of.
boost/utility/result_of.hpp is rather expensive to include.
Using decltype here makes the compile time go down by almost half a sec.
2015-06-19 09:49:26 +02:00
Joel de Guzman c6aba10d55 Merge pull request #124 from mlang/x3/context/decltype-auto
X3: Eliminate two more hidden cases of get_result.
2015-06-19 09:07:21 +08:00
Mario Lang d6b5f0d925 X3: Eliminate two more hidden cases of get_result.
This is a follow-up to 6ede5f7c81.
2015-06-18 17:19:49 +02:00
Mario Lang d87aa6846b X3: Add another missing const&.
A tiny change which results in 7kb less binary size and
17.8s to 17.2s compile time reduction (GCC).
2015-06-18 16:00:04 +02:00
Mario Lang 20658b2b21 X3: Remove useless using-directives. 2015-06-17 15:46:50 +02:00
Mario Lang 6ede5f7c81 X3: [context] decltype(auto) makes get_result unnecessary. 2015-06-17 02:06:51 +02:00
Mario Lang 2f20512a3b X3: Make use of implicit constructibility. 2015-06-16 23:46:01 +02:00
Mario Lang 53352198fa X3: Use inheritance instead of typedef typename ...::type type; 2015-06-16 01:23:37 +02:00
Mario Lang af73c1c209 X3: Simplify alternative::parse. 2015-06-14 19:32:25 +02:00
Mario Lang 1d7159ce0b X3: Avoid copying the arguments to {unary,binary}_parser, sequence and alternative.
For consistency with the rest.  Apparently, this brings the executable size
of an X3 grammar of mine down from 440936 to 420000.  It also reduces
compilation time a bit, which was rather unexpected (18.3s to 17.8s).
2015-06-13 19:31:44 +02:00
Joel de Guzman a9d7610cab Merge pull request #84 from tabe/develop-set_end
fix unused parameter
2015-06-03 23:24:11 +08:00
Andrzej Krzemieński 7d1bf76803 Removed unused result_t
I get loads of warnings about this unused typedef when building QuickBook.
2015-06-02 17:09:32 +02:00
Mario Lang bc20650d9e X3: Remove unused include mpl/joint_view.hpp and add mpl/insert_range.hpp where appropriate. 2015-05-31 12:34:40 +02:00
Mario Lang 2a94b18e97 X3: Fix push_back to mpl::view in x3::sequence.
This is a follow-up to 20170960dc which
fixes x3::alternative, but omitted x3::sequence.
2015-05-31 01:12:09 +02:00
Mario Lang 2995de5fa1 Allow retrieval of the iterator_range of a position_tagged.
position_cache allows to retrieve the iterator_range of a
position tagged AST type.  However, pos_cache in error_handler<Iterator>
is private, so the iterator_range can not be retrieved from client code.
It would be useful for a "late raw" and for testing purposes.
This patch adds error_handler<Iterator>::position_of(position_tagged).
2015-05-29 11:10:15 +02:00