{"action":"created","issue":{"url":"https://api.github.com/repos/rho-devel/rho/issues/88","repository_url":"https://api.github.com/repos/rho-devel/rho","labels_url":"https://api.github.com/repos/rho-devel/rho/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/rho-devel/rho/issues/88/comments","events_url":"https://api.github.com/repos/rho-devel/rho/issues/88/events","html_url":"https://github.com/rho-devel/rho/issues/88","id":158268822,"number":88,"title":"Build error on Mac OSX","user":{"login":"llbit","id":2757386,"avatar_url":"https://avatars.githubusercontent.com/u/2757386?v=3","gravatar_id":"","url":"https://api.github.com/users/llbit","html_url":"https://github.com/llbit","followers_url":"https://api.github.com/users/llbit/followers","following_url":"https://api.github.com/users/llbit/following{/other_user}","gists_url":"https://api.github.com/users/llbit/gists{/gist_id}","starred_url":"https://api.github.com/users/llbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llbit/subscriptions","organizations_url":"https://api.github.com/users/llbit/orgs","repos_url":"https://api.github.com/users/llbit/repos","events_url":"https://api.github.com/users/llbit/events{/privacy}","received_events_url":"https://api.github.com/users/llbit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-06-03T00:35:03Z","updated_at":"2016-06-03T20:10:25Z","closed_at":null,"body":"I merged Arun's branch into the current master branch and tried to build on OSX with Clang 3.6.2. I get this build error:\r\n\r\n```\r\nIn file included from ../../../src/main/names.cpp:40:\r\nIn file included from ../../../src/include/Internal.h:40:\r\n../../../src/include/rho/BuiltInFunction.hpp:524:6: error: definition with same mangled\r\n      name as another definition\r\n            TableEntry(const char* name, FUNCTION function,\r\n            ^\r\n../../../src/include/rho/BuiltInFunction.hpp:524:6: note: previous definition is here\r\n../../../src/include/rho/BuiltInFunction.hpp:524:6: error: definition with same mangled\r\n      name as another definition\r\n            TableEntry(const char* name, FUNCTION function,\r\n            ^\r\n../../../src/include/rho/BuiltInFunction.hpp:524:6: note: previous definition is here\r\n```\r\n\r\nThe line it complains about is the declaration of the `TableEntry` constructor. The constructor is templated and is used only as a convenience to construct table entries for the builtin function table. Here is the entirety of the `TableEntry` struct:\r\n\r\n```\r\n  struct TableEntry {\r\n            template<typename FUNCTION>\r\n            TableEntry(const char* name, FUNCTION function,\r\n                       unsigned int variant, unsigned int flags, int arity,\r\n                       PPinfo ppinfo,\r\n                       const char* first_arg_name = nullptr,\r\n                       DispatchType dispatch = DispatchType::NONE)\r\n                : function(new BuiltInFunction(name, function, variant,\r\n                                               flags, arity, ppinfo,\r\n                                               s_next_offset++,\r\n                                               first_arg_name, dispatch))\r\n            {}\r\n            BuiltInFunction* function;\r\n            static unsigned int s_next_offset;\r\n        };\r\n```\r\n\r\nIt seems like it should be possible to remove the `TableEntry` struct and instead constructing builtin functions directly could solve the compile error. The `s_next_offset` counter would need to be moved to `BuiltInFunction` instead."},"comment":{"url":"https://api.github.com/repos/rho-devel/rho/issues/comments/223681880","html_url":"https://github.com/rho-devel/rho/issues/88#issuecomment-223681880","issue_url":"https://api.github.com/repos/rho-devel/rho/issues/88","id":223681880,"user":{"login":"llbit","id":2757386,"avatar_url":"https://avatars.githubusercontent.com/u/2757386?v=3","gravatar_id":"","url":"https://api.github.com/users/llbit","html_url":"https://github.com/llbit","followers_url":"https://api.github.com/users/llbit/followers","following_url":"https://api.github.com/users/llbit/following{/other_user}","gists_url":"https://api.github.com/users/llbit/gists{/gist_id}","starred_url":"https://api.github.com/users/llbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llbit/subscriptions","organizations_url":"https://api.github.com/users/llbit/orgs","repos_url":"https://api.github.com/users/llbit/repos","events_url":"https://api.github.com/users/llbit/events{/privacy}","received_events_url":"https://api.github.com/users/llbit/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T20:10:25Z","updated_at":"2016-06-03T20:10:25Z","body":"I don't think it is possible to replace all `dynamic_cast` by `llvm:dyn_cast`, I think that would only work for types derived from LLVM base types."}}
{"actor":{"display_login":"llbit"}}