{"action":"created","issue":{"url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/29","repository_url":"https://api.github.com/repos/wgtdkp/wgtcc","labels_url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/29/comments","events_url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/29/events","html_url":"https://github.com/wgtdkp/wgtcc/issues/29","id":234411367,"number":29,"title":"cpp constant evaluation not robust","user":{"login":"huangguiyang","id":3087203,"avatar_url":"https://avatars1.githubusercontent.com/u/3087203?v=3","gravatar_id":"","url":"https://api.github.com/users/huangguiyang","html_url":"https://github.com/huangguiyang","followers_url":"https://api.github.com/users/huangguiyang/followers","following_url":"https://api.github.com/users/huangguiyang/following{/other_user}","gists_url":"https://api.github.com/users/huangguiyang/gists{/gist_id}","starred_url":"https://api.github.com/users/huangguiyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangguiyang/subscriptions","organizations_url":"https://api.github.com/users/huangguiyang/orgs","repos_url":"https://api.github.com/users/huangguiyang/repos","events_url":"https://api.github.com/users/huangguiyang/events{/privacy}","received_events_url":"https://api.github.com/users/huangguiyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-08T04:54:39Z","updated_at":"2017-06-09T02:56:41Z","closed_at":null,"body":"An example:\r\n\r\n```\r\n# if (long)1.2\r\n111\r\n#else\r\n222\r\n#endif\r\n```"},"comment":{"url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/comments/307282009","html_url":"https://github.com/wgtdkp/wgtcc/issues/29#issuecomment-307282009","issue_url":"https://api.github.com/repos/wgtdkp/wgtcc/issues/29","id":307282009,"user":{"login":"wgtdkp","id":6128114,"avatar_url":"https://avatars3.githubusercontent.com/u/6128114?v=3","gravatar_id":"","url":"https://api.github.com/users/wgtdkp","html_url":"https://github.com/wgtdkp","followers_url":"https://api.github.com/users/wgtdkp/followers","following_url":"https://api.github.com/users/wgtdkp/following{/other_user}","gists_url":"https://api.github.com/users/wgtdkp/gists{/gist_id}","starred_url":"https://api.github.com/users/wgtdkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wgtdkp/subscriptions","organizations_url":"https://api.github.com/users/wgtdkp/orgs","repos_url":"https://api.github.com/users/wgtdkp/repos","events_url":"https://api.github.com/users/wgtdkp/events{/privacy}","received_events_url":"https://api.github.com/users/wgtdkp/received_events","type":"User","site_admin":false},"created_at":"2017-06-09T02:56:41Z","updated_at":"2017-06-09T02:56:41Z","body":"The condition expression evaluation seems to be the curse.\r\nBut, the compiler shouldn't distinguish `type specifier` to `identifier` when it is doing preprocessing, right? So `long` of `(long)1.2` should be treated as an `identifier`, and the standard says: an `identifier` in condition expression of control directive after expansion should be treated as `0`, which results in this problem here.\r\n\r\ngcc gets right, but I doubt if it's standard, here I found the specifications in C11 standard [6.10.1.4] :\r\n> After all replacements due to macro expansion and the defined unary\r\noperator have been performed, all remaining identifiers (including those lexically\r\nidentical to keywords) are replaced with the pp-number 0, and then each preprocessing\r\ntoken is converted into a token."}}
{"actor":{"display_login":"wgtdkp"}}