You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/28 22:01:30 UTC

[jira] Created: (STDCXX-240) [HP aCC] #define RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on

[HP aCC] #define RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on
------------------------------------------------------------

         Key: STDCXX-240
         URL: http://issues.apache.org/jira/browse/STDCXX-240
     Project: C++ Standard Library
        Type: Improvement

  Components: Build  
    Reporter: Martin Sebor


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 <wa...@cup.hp.com>
Organization: California Language Labs
To: oemsupport <oe...@roguewave.com>
CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>



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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
    [ 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-240:
--------------------------------

    Affects Version/s: 4.1.2
                       4.1.3
                       4.1.4
        Fix Version/s: 4.2.1
              Summary: [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on  (was: [HP aCC] #define RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on)

This is reasonable enhancement that should be easily doable. Scheduled for 4.2.1.

> [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on
> -------------------------------------------------------------
>
>                 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
>             Fix For: 4.2.1
>
>
> 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548008 ] 

Travis Vitek commented on STDCXX-240:
-------------------------------------

Gnu C++ has `-fno-exceptions' which undefines the __EXCEPTIONS macro.
VisualAge C++ has `-qnoeh' and `-qnounwind' which undefines the __EXCEPTIONS macro.
Compaq C++ has `-noexceptions' which undefines __EXCEPTIONS macro.
SGI C++ has `-LANG:exceptions=OFF', which undefines the __EXCEPTIONS macro.

SunPro C++ has `-features=no%except' or `-noex' to disable exception support. I don't see any way to check this setting at compile time.
Visual C++ has `/GX-' or `/EHs-'. Unfortunately this doesn't disable exception support in the same way that the other compilers do. If these options are used and an exception is thrown, destructors are not called as the stack is unwound. I don't see any way to check this setting at compile time.


> #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
>
>
> 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-240:
--------------------------------

    Attachment: stdcxx-240.patch


2007-12-18  Travis Vitek  <vi...@roguewave.com>

	STDCXX-240
	* include/rw/_config-acc.h: Conditionally disable exception
	support if appropriate command line option is set.
	* include/rw/_config-deccxx.h: Ditto.
	* include/rw/_config-eccp.h: Ditto.
	* include/rw/_config-gcc.h: Ditto.
	* include/rw/_config-icc.h: Ditto.
	* include/rw/_config-mipspro.h: Ditto.
	* include/rw/_config-xlc.h: Ditto.

I'm filing a new bug on the test suite to get it updated to work when _RWSTD_NO_EXCEPTIONS is defined.

> #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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549274 ] 

Martin Sebor commented on STDCXX-240:
-------------------------------------

Is it enough to #define only _RWSTD_NO_EXCEPTIONS but none of the other exceptions-related macros like _RWSTD_NO_LIBC_EXCEPTION_SPEC and _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW?

When you tested it with XLC++ on AIX, did you use the -qnoeh compiler option to disable exceptions? If so, I wouldn't expect the compiler to complain about missing exception specifications on functions that otherwise require them (and I'd complain to IBM to fix the compiler :)

> #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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-240:
--------------------------------

    Attachment:     (was: stdcxx-240.patch)

> #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
>
>
> 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552501 ] 

Travis Vitek commented on STDCXX-240:
-------------------------------------

Some of the compilers handle disabling of exceptions differently. With AIX, the keywords remain valid, and are expected in some contexts.

The warnings shown above seem inconsistent as one message says the throw spec is missing, and then the next says the exception spec is being ignored. A simple testcase shows that this is the case. So I need to disable exception usage in the library, but I need to leave the exception specs for at least one platform.

> #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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549459 ] 

Martin Sebor commented on STDCXX-240:
-------------------------------------

I understand that what's at issue here is changing the library headers by compiling with or without -qnoeh *without* reconfiguring (and rebuilding) the library binary.

Our tests should be able to deal with no exception support via macro hackery.

The situation is more difficult with examples because we try to avoid polluting them with proprietary macros. Most examples, with the exception of those that showcase our extensions, should be 100% conforming and portable C++ and should compile with other implementations (this will be true for most once we deal with STDCXX-425).

I agree that _LIBC_THROWS() should expand to nothing when -qnoeh is used *and* if it causes the compiler to have a cow. Otherwise, if it's just silently ignored, we could leave it alone. But then again, removing it unconditionally should be the safest way to go.

As for why building the library with -qnoeh, and then attempting to build user code without it is a bad idea, I assume you're referring to the problem of the library throwing an exception that the user code won't prepared to handle when compiled with -qnoeh? If so, I agree that would be bad. Fortunately, we provide a hook for user programs to gain control (via a callback mechanism) before the library throws so this shouldn't be a big problem. The hook isn't used in all places where the library can throw (there a number of places where the library can cause the C++ runtime to throw by invoking operator new or dynamic_cast) but that's, presumably, handled correctly by the compiler switch. All other exceptions thrown directly by the library go through this hook (__rw::__rw_throw_proc).

> #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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-240:
--------------------------------

    Attachment: stdcxx-240.patch

Well, the test suite doesn't build cleanly if _RWSTD_NO_EXCEPTIONS is defined. There are many undefined variable warnings, and many places that use keywords try/throw/catch without checking the macro first.


I can't fully say that this is working completely because many of the tests don't compile when _RWSTD_NO_EXCEPTIONS is defined. I also get some warnings because of mismatches. On AIX, for example, I get these warnings.

"/amd/devco/vitek/stdcxx/trunk/include/new", line 216.7: 1540-0419 (W) An exception-specification must be specified as "throw(std::bad_alloc)" to match the implicit declaration.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 216.7: 1540-1088 (W) The exception specification is being ignored.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 223.6: 1540-0419 (W) An exception-specification must be specified as "throw()" to match the implicit declaration.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 223.6: 1540-1088 (W) The exception specification is being ignored.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 240.7: 1540-0419 (W) An exception-specification must be specified as "throw(std::bad_alloc)" to match the implicit declaration.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 240.7: 1540-1088 (W) The exception specification is being ignored.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 250.6: 1540-0419 (W) An exception-specification must be specified as "throw()" to match the implicit declaration.
"/amd/devco/vitek/stdcxx/trunk/include/new", line 250.6: 1540-1088 (W) The exception specification is being ignored.

Not sure how to proceed with this. I'm attaching the patch that checks the above mentioned macros in the appropriate config headers. It does nothing else.

> #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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Commented: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555746#action_12555746 ] 

Martin Sebor commented on STDCXX-240:
-------------------------------------

Travis, the patch has been checked in so I think the issue can be Closed.

Alternatively, if you think it should be tested, you can Resolve it but hold off on Closing.

I think it'd be nice to test it but we'd need a non-trivial enhancement to our build and test infrastructure to make it possible: we'd need the ability to compile certain tests with special command line options.

> #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-vacpp60.patch, 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-240:
--------------------------------

    Patch Info: [Patch Available]

> #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-vacpp60.patch, 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-240:
--------------------------------

    Attachment: stdcxx-240-vacpp60.patch

committed to trunk http://svn.apache.org/viewvc?view=rev&revision=605368
merged to 4.2.x http://svn.apache.org/viewvc?view=rev&revision=605369

The previous patch doesn't work with VisualAge C++ prior to version 7. Here is a small tweak to get builds working on that configuration again.

2007-12-19  Travis Vitek  <vi...@roguewave.com> 

	* include/rw/_config-xlc.h [__IBMCPP__]: Conditionally disable
	exception support if command line option is set and the compiler
	is version 7.0 or later.


> #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-vacpp60.patch, 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Assigned: (STDCXX-240) [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek reassigned STDCXX-240:
-----------------------------------

    Assignee: Travis Vitek

> [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on
> -------------------------------------------------------------
>
>                 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
>             Fix For: 4.2.1
>
>
> 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Updated: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-240:
--------------------------------

    Priority: Minor  (was: Major)
     Summary: #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option  (was: [HP aCC] #define _RWSTD_NO_EXCEPTIONS when __HPACC_NOEH is on)

gcc #defines the macro __EXCEPTIONS when C++ exceptions are enabled. The macro is #undefined when -fno-exceptions is used on the command line. See: http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

When using gcc we should key in on this macro, similarly to checking __HPACC_NOEH when using HP aCC. It's likely that other compilers have similar macros that we might want to treat similarly.

Making this a general enhancement (as opposed to one specific to just HP aCC) but bumping down Priority to Minor.

> #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
>
>
> 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.


[jira] Closed: (STDCXX-240) #define _RWSTD_NO_EXCEPTIONS when exceptions are disabled via command line option

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek closed STDCXX-240.
-------------------------------

    Resolution: Fixed

Closing.

> #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-vacpp60.patch, 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 <wa...@cup.hp.com>
> Organization: California Language Labs
> To: oemsupport <oe...@roguewave.com>
> CC: dhandly@cup.hp.com, wanc_at_hp <wa...@cup.hp.com>
> 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.