Closed
Bug 764104
Opened 12 years ago
Closed 12 years ago
Compilation fails if C++ keyword used in WebIDL enum.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: wchen, Assigned: bzbarsky)
Details
Attachments
(1 file)
3.79 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
WebIDL enum containing a C++ keyword will generate C++ a enum that contain the keyword, causing compilation to fail. Example: enum NotificationPermission { "default", "denied", "granted" }; taken from (http://dvcs.w3.org/hg/notifications/raw-file/tip/Overview.html#api) will generate: enum valuelist { default, denied, granted }; The enum above will fail to compile due to the "default" keyword (at least in clang).
Assignee | ||
Comment 1•12 years ago
|
||
Yeah, this is a bit of a PITA. One option is to upcase the first character of each enum value. So we would have: enum valuelist { Default, Denied, Granted }; Another is to add more special cases to getEnumValueName (there's already a special case for "", but we could add one for "default").
I vote for upper case.
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #632504 -
Flags: review?(peterv)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Updated•12 years ago
|
Attachment #632504 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fd65c8f53c8
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla16
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0fd65c8f53c8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•