[prev in list] [next in list] [prev in thread] [next in thread]
List: omniorb-list
Subject: Re: [omniORB] Problem with "// never return" functions and static
From: Martin Baschnegger <0xCDCDCDCD () gmx ! at>
Date: 2010-07-24 13:15:46
Message-ID: 4C4AE782.2020504 () gmx ! at
[Download RAW message or body]
On 23.07.2010 19:41, Duncan Grisby wrote:
> On Fri, 2010-07-09 at 18:18 +0200, Martin B. wrote:
>
>> One of the warnings it's got is that it'll tell you when you are
>> dereferencing a NULL pointer. The problem is now that it will generate
>> this warning all over the omniORB headers, e.g:
>> ***
>> [4.1.2, stringtypes.h, ln 219]
>> inline char& operator[] (_CORBA_ULong index_) {
>> if (!_data) {
>> _CORBA_bound_check_error(); // never return
>> }
>> return _data[index_];
>> }
>> ***
>>
>> This could be solved by tagging all "// never return" functions with
>> __declspec(noreturn)
>> for VS Builds. (Obviously via some macro.)
>
> Does the declaration go on the function prototype or on the use of the
> function? If it goes on the prototype, that's probably ok. I'd rather
> not uglify all the uses with such things.
>
> In principle, I'll accept a patch as long as it doesn't make the code
> much less readable, or create an ongoing maintenance headache.
>
Thanks Duncan. The declaration goes on the prototype. I'll try to get a
patch together!
cheers,
Martin
_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic