{"action":"created","issue":{"url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/76","labels_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/76/comments","events_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/76/events","html_url":"https://github.com/andysworkshop/stm32plus/issues/76","id":52512323,"number":76,"title":"Consider adding #undef __EXCEPTIONS in stl_config.h","user":{"login":"tokoro10g","id":564322,"avatar_url":"https://avatars.githubusercontent.com/u/564322?v=3","gravatar_id":"","url":"https://api.github.com/users/tokoro10g","html_url":"https://github.com/tokoro10g","followers_url":"https://api.github.com/users/tokoro10g/followers","following_url":"https://api.github.com/users/tokoro10g/following{/other_user}","gists_url":"https://api.github.com/users/tokoro10g/gists{/gist_id}","starred_url":"https://api.github.com/users/tokoro10g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokoro10g/subscriptions","organizations_url":"https://api.github.com/users/tokoro10g/orgs","repos_url":"https://api.github.com/users/tokoro10g/repos","events_url":"https://api.github.com/users/tokoro10g/events{/privacy}","received_events_url":"https://api.github.com/users/tokoro10g/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andysworkshop/stm32plus/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"andysworkshop","id":4107468,"avatar_url":"https://avatars.githubusercontent.com/u/4107468?v=3","gravatar_id":"","url":"https://api.github.com/users/andysworkshop","html_url":"https://github.com/andysworkshop","followers_url":"https://api.github.com/users/andysworkshop/followers","following_url":"https://api.github.com/users/andysworkshop/following{/other_user}","gists_url":"https://api.github.com/users/andysworkshop/gists{/gist_id}","starred_url":"https://api.github.com/users/andysworkshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andysworkshop/subscriptions","organizations_url":"https://api.github.com/users/andysworkshop/orgs","repos_url":"https://api.github.com/users/andysworkshop/repos","events_url":"https://api.github.com/users/andysworkshop/events{/privacy}","received_events_url":"https://api.github.com/users/andysworkshop/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2014-12-19T18:16:23Z","updated_at":"2015-01-02T11:34:15Z","closed_at":"2015-01-02T11:34:15Z","body":"With `__EXCEPTIONS` defined, I get the following message if I use iterator.\r\n\r\n```\r\nIn file included from ../../stm32plus/lib/include/stl/iterator:30:0,\r\n                 from ../../stm32plus/lib/include/config/event.h:19,\r\n                 from ../../stm32plus/lib/include/config/i2c.h:20,\r\n                 from main.cpp:3:\r\n../../stm32plus/lib/include/stl/string: In member function 'void std::_String_base<_Tp, _Alloc>::_M_throw_length_error() const':\r\n../../stm32plus/lib/include/stl/string:242:42: warning: there are no arguments to 'length_error' that depend on a template parameter, so a declaration of 'length_error' must be available [-fpermissive]\r\n   __STL_THROW(length_error(\"basic_string\"));\r\n                                          ^\r\n../../stm32plus/lib/include/stl/stl_config.h:563:33: note: in definition of macro '__STL_THROW'\r\n #   define __STL_THROW(x) throw x\r\n                                 ^\r\n../../stm32plus/lib/include/stl/string: In member function 'void std::_String_base<_Tp, _Alloc>::_M_throw_out_of_range() const':\r\n../../stm32plus/lib/include/stl/string:247:42: warning: there are no arguments to 'out_of_range' that depend on a template parameter, so a declaration of 'out_of_range' must be available [-fpermissive]\r\n   __STL_THROW(out_of_range(\"basic_string\"));\r\n                                          ^\r\n../../stm32plus/lib/include/stl/stl_config.h:563:33: note: in definition of macro '__STL_THROW'\r\n #   define __STL_THROW(x) throw x\r\n                                 ^\r\n```\r\n\r\nThis macro is a part of \"not-well-documented\" part of GCC, and because we hardly use such exceptions with MCU, it should be disabled by default (although GCC defines)..."},"comment":{"url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/comments/68521037","html_url":"https://github.com/andysworkshop/stm32plus/issues/76#issuecomment-68521037","issue_url":"https://api.github.com/repos/andysworkshop/stm32plus/issues/76","id":68521037,"user":{"login":"andysworkshop","id":4107468,"avatar_url":"https://avatars.githubusercontent.com/u/4107468?v=3","gravatar_id":"","url":"https://api.github.com/users/andysworkshop","html_url":"https://github.com/andysworkshop","followers_url":"https://api.github.com/users/andysworkshop/followers","following_url":"https://api.github.com/users/andysworkshop/following{/other_user}","gists_url":"https://api.github.com/users/andysworkshop/gists{/gist_id}","starred_url":"https://api.github.com/users/andysworkshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andysworkshop/subscriptions","organizations_url":"https://api.github.com/users/andysworkshop/orgs","repos_url":"https://api.github.com/users/andysworkshop/repos","events_url":"https://api.github.com/users/andysworkshop/events{/privacy}","received_events_url":"https://api.github.com/users/andysworkshop/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T11:34:15Z","updated_at":"2015-01-02T11:34:15Z","body":"I've looked into this. `__EXCEPTIONS` is set by gcc only if you do not use the `-fno-exceptions` compile flag. All the stm32plus examples build with this flag by default. We should try to avoid setting any of the \"double-underscore\" macros in code since these are reserved by convention for the compiler.\r\n\r\nShort story: make sure you're compiling `-fno-exceptions`."}}