Closed Bug 880492 Opened 11 years ago Closed 11 years ago

use GCC's typeof when decltype is not available

Categories

(Core :: MFBT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: karlt, Assigned: karlt)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

decltype can be useful, but is not available when compiling with gcc 4.4.

typeof sounds very similar:

"A `typeof'-construct can be used anywhere a typedef name could be
used.  For example, you can use it in a declaration, in a cast, or
inside of `sizeof' or `typeof'."

"If you are writing a header file that must work when included in ISO C
programs, write `__typeof__' instead of `typeof'."
Attached patch patchSplinter Review
Attachment #759470 - Flags: review?(jwalden+bmo)
Comment on attachment 759470 [details] [diff] [review]
patch

Review of attachment 759470 [details] [diff] [review]:
-----------------------------------------------------------------

If bug 810274 comment 18 is correct that we might be able to reconsider decltype in Firefox 25, this is gonna have a short lifetime, but that's probably not a bad thing.
Attachment #759470 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/03b0f599a003
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Depends on: 1146203
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: