Closed Bug 150114 Opened 23 years ago Closed 17 years ago

RFE: Auto-detect rtti and set define

Categories

(SeaMonkey :: Build Config, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: roland.mainz, Unassigned)

Details

Attachments

(3 files)

RFE: Need CPP symbol which is set when RTTI is available Example: I'd like to add some code in the print modules which checks whether a object passed as argument is from a given class (this is highly usefull to hunt-down some crashers in print preview and printing SVG). Since RTTI is AFAIK not available in all C++ compilers and not allowed in normal Mozilla code I need a symbol which is set only when RTTI is available, e.g. -- snip -- #ifdef HAS_RTTI NS_ASSERTION(x instanceof nsRenderingContextPS, "Passed renderingcontext is not a nsRenderingContextPS"); #endif /* HAS_RTTI */ -- snip --
cls wrote: > Created an attachment (id=86970) > define HAVE_CPP_RTTI iff --enable-cpp-rtti is set Mhh, the idea was more to define the flag if the compiler supports RTTI (I assume that some vendor compilers like Sun Workshop support this out-of-the-box) ...
That's different. You want rtti to be auto-detected. Which still wouldn't help you as you'd have to explicitly enable it with this switch anyway.
seawood wrote: > That's different. You want rtti to be auto-detected. Yes, that's what I want... :) > Which still wouldn't > help you as you'd have to explicitly enable it with this switch anyway Really ? Do we disable RTTI in Sun Workshop ? I thought the --enable-cpp-rtti is for gcc only...
Well, we're supposed to turn rtti and exceptions off everywhere as it supposedly makes a difference in generated size. --enable-cpp-rtti currently only works for gcc though I'm sure we'd hook up other compilers if we knew the flags.
Priority: -- → P5
Summary: RFE: Need CPP symbol which is set when RTTI is available → RFE: Auto-detect rtti and set define
Target Milestone: --- → Future
cls wrote: > --enable-cpp-rtti currently only works for gcc though I'm sure we'd hook up > other compilers if we knew the flags. Well, AFAIK you cannot turn it off for Sun Workshop unless you want to run in "compatibility" mode (something we IMHO do not want... =:-) for far older versions of Sun Workshop (4.x) ...
Small test tool, compiles on Sun Workshop 7 FCS and gcc 2.95.1 (specifying -fno-rtti for gcc will abort the compiler with an error).
Mass reassign to new default build assignee
Assignee: seawood → mozbugs-build
Priority: P5 → --
Mass reassign of Build/Config bugs to Leaf.
Assignee: mozbugs-build → leaf
Target Milestone: Future → ---
Assignee: leaf → cmp
Product: Browser → Seamonkey
Mass reassign of open bugs for chase@mozilla.org to build@mozilla-org.bugs.
Assignee: chase → build
Mass re-assign of bugs that aren't on the build team radar, so bugs assigned to build@mozilla-org.bugs reflects reality. If there is a bug you really think we need to be looking at, please *email* build@mozilla.org with a bug number and explanation.
Assignee: build → nobody
QA Contact: granrosebugs → build-config
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: