{"action":"created","issue":{"url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/56","repository_url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi","labels_url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/56/comments","events_url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/56/events","html_url":"https://github.com/itanium-cxx-abi/cxx-abi/issues/56","id":326310939,"number":56,"title":"mangling for fixed point types","user":{"login":"PiJoules","id":6019989,"avatar_url":"https://avatars3.githubusercontent.com/u/6019989?v=4","gravatar_id":"","url":"https://api.github.com/users/PiJoules","html_url":"https://github.com/PiJoules","followers_url":"https://api.github.com/users/PiJoules/followers","following_url":"https://api.github.com/users/PiJoules/following{/other_user}","gists_url":"https://api.github.com/users/PiJoules/gists{/gist_id}","starred_url":"https://api.github.com/users/PiJoules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PiJoules/subscriptions","organizations_url":"https://api.github.com/users/PiJoules/orgs","repos_url":"https://api.github.com/users/PiJoules/repos","events_url":"https://api.github.com/users/PiJoules/events{/privacy}","received_events_url":"https://api.github.com/users/PiJoules/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-24T21:57:06Z","updated_at":"2018-05-25T01:47:01Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nWe are attempting to implement fixed point types in clang according to Chapter 4 of the [Embedded-C Spec / ISO N1169](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf). This extension includes the addition of up to 24 fixed point types that vary in size, sign, fract/accum, and saturated/not saturated.\r\n\r\n```\r\nsigned short _Accum\r\nsigned _Accum\r\nsigned long _Accum\r\nunsigned short _Accum\r\nunsigned _Accum\r\nunsigned long _Accum\r\n_Sat signed short _Accum\r\n_Sat signed _Accum\r\n_Sat signed long _Accum\r\n_Sat unsigned short _Accum\r\n_Sat unsigned _Accum\r\n_Sat unsigned long _Accum\r\nsigned short _Fract\r\nsigned _Fract\r\nsigned long _Fract\r\nunsigned short _Fract\r\nunsigned _Fract\r\nunsigned long _Fract\r\n_Sat signed short _Fract\r\n_Sat signed _Fract\r\n_Sat signed long _Fract\r\n_Sat unsigned short _Fract\r\n_Sat unsigned _Fract\r\n_Sat unsigned long _Fract\r\n```\r\n\r\nThe standard though does not specify mangling when using these types in C++, so usage of these types is limited to C. \r\n\r\nAny suggestions for neatly mangling these types?\r\n\r\nFor now, we can do something along the lines of `u7fixed00` to `u7fixed23` or `u4SulA` (for `_Sat unsigned long _Accum` as an example), but would like to see what other people's thoughts are."},"comment":{"url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/comments/391916689","html_url":"https://github.com/itanium-cxx-abi/cxx-abi/issues/56#issuecomment-391916689","issue_url":"https://api.github.com/repos/itanium-cxx-abi/cxx-abi/issues/56","id":391916689,"user":{"login":"zygoloid","id":232783,"avatar_url":"https://avatars1.githubusercontent.com/u/232783?v=4","gravatar_id":"","url":"https://api.github.com/users/zygoloid","html_url":"https://github.com/zygoloid","followers_url":"https://api.github.com/users/zygoloid/followers","following_url":"https://api.github.com/users/zygoloid/following{/other_user}","gists_url":"https://api.github.com/users/zygoloid/gists{/gist_id}","starred_url":"https://api.github.com/users/zygoloid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zygoloid/subscriptions","organizations_url":"https://api.github.com/users/zygoloid/orgs","repos_url":"https://api.github.com/users/zygoloid/repos","events_url":"https://api.github.com/users/zygoloid/events{/privacy}","received_events_url":"https://api.github.com/users/zygoloid/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T01:47:01Z","updated_at":"2018-05-25T01:47:01Z","author_association":"CONTRIBUTOR","body":"I don't see any particular problem with there being combinations of mangling productions that don't correspond to any valid source program (that's actually really common, eg `_Z1fA3_Ri`). But I think it'd also be fine to describe the rule as:\r\n\r\n> \\<*builtin-type*> ::= [`DS`] `DA` \\<*fixed-point-size*>     # `[_Sat] T _Accum`\r\n> \\<*builtin-type*> ::= [`DS`] `DR` \\<*fixed-point-size*>     # `[_Sat] T _Fract`\r\n> \\<*fixed-point-size*> ::= `s` # `short`\r\n> \\<*fixed-point-size*> ::= `t` # `unsigned short`\r\n> \\<*fixed-point-size*> ::= `i` # plain\r\n> \\<*fixed-point-size*> ::= `j` # `unsigned`\r\n> \\<*fixed-point-size*> ::= `l` # `long`\r\n> \\<*fixed-point-size*> ::= `m` # `unsigned long`\r\n\r\n[Note: I moved the `DS` to the start -- I think that makes more sense, as it's more like a type qualifier in some sense. I'll also make that change to my prior comments to avoid later confusion.]\r\n\r\nBut I don't want to get bogged down with how we specify the rule. The thing to focus on right now is what rule we use. Does the one in this comment seem OK to you?"}}
{"actor":{"display_login":"zygoloid"}}