[ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549291 ]
Travis Vitek commented on STDCXX-240: ------------------------------------- The original snippet provided above shows someone trying to build their code without exception support, with a library was configured with exception support. If I attempt to do this [e.g., build the library as normal, then build the examples without exceptions], I get errors in the tests and examples where we use exception keywords try/throw/catch. I'm guessing I should go through and fix all of those issues and add those changes to the patch or I should open up a new bug for the problem. Considering the issue is pre-existing and is fairly large, it might be better to create a new bug for dealing with it. I don't believe we should need to define the other macros explicitly. The include order is such that we shouldn't have to. I do see that we define _LIBC_THROWS to `throw ()' regardless of any of the other exception macros. This is probably wrong. I believe the error above was caused by building the library with -qnoeh, and then attempting to build user code without it. Now that I think about it, that is a bad idea anyways. > #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line > option > --------------------------------------------------------------------------------- > > Key: STDCXX-240 > URL: https://issues.apache.org/jira/browse/STDCXX-240 > Project: C++ Standard Library > Issue Type: Improvement > Components: Build > Affects Versions: 4.1.2, 4.1.3, 4.1.4 > Reporter: Martin Sebor > Assignee: Travis Vitek > Priority: Minor > Fix For: 4.2.1 > > Attachments: stdcxx-240.patch > > > Moved from the Rogue Wave bug tracking database: > Class/File: stdcomp.h > Fix Priority: Can Fix > Long Description: > *** Dec 1 1999 6:03PM *** sebor *** > A request for enhancement. > Subject: define RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is > Date: Wed, 01 Dec 1999 17:11:36 -0800 > From: Chichiang Wan <[EMAIL PROTECTED]> > Organization: California Language Labs > To: oemsupport <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED], wanc_at_hp <[EMAIL PROTECTED]> > aCC has an option +noeh. When it is provided, __HPACC_NOEH will be > defined. It would be nice for users to need to only use +noeh. For > that, > RWSTD_NO_EXCEPTIONS needs to be defined conditionally. > ========================================================= > $ cat test.C > #include <string> > $ aCC +noeh -c test.C > Error 46: "/opt/aCC/include/memory", line 493 # Exception handling is > not > enabled (do not use the +noeh flag to aCC). > RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc); > -- Chichiang > ****Modified By: sebor @ May 29, 2000 10:28:25 PM**** > We should do this AND test it -- not just on aCC but in general with all > compilers that support this feature. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.