Unix
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Unix

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 21st, 2008, 11:01 AM
Barry deFreese
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Here is an updated patch. I hope I got it right this time.

I added __attribute__ ((noreturn)) to i386_exception but I now get this
warning:

/i386/i386/trap.c: In function 'i386_exception':
/i386/i386/trap.c:634: warning: 'noreturn' function does return

But I don't see a return anywhere!??

Thanks,

Barry deFreese
Your favorite idiot.

Reply With Quote
  #2  
Old July 21st, 2008, 11:39 AM
Samuel Thibault
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Barry deFreese, le Mon 21 Jul 2008 11:01:31 -0400, a :
Here is an updated patch. I hope I got it right this time.

I added __attribute__ ((noreturn)) to i386_exception but I now get this
warning:

/i386/i386/trap.c: In function 'i386_exception':
/i386/i386/trap.c:634: warning: 'noreturn' function does return

But I don't see a return anywhere!??

Indeed, but functions implicitely return at the end of it

And in that case, that's why I said to add noreturn to i386_exception
and similar. exception() is one of those "similars".

Samuel

Reply With Quote
  #3  
Old July 21st, 2008, 11:39 AM
Barry deFreese
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Samuel Thibault wrote:
<snip>
Indeed, but functions implicitely return at the end of it
>

And in that case, that's why I said to add noreturn to i386_exception
and similar. exception() is one of those "similars".
>

Samuel
>


Samuel,

K fair enough but exception() does do a few returns, you want me to go
ahead and remove those also?

Thanks,

Barry

Reply With Quote
  #4  
Old July 21st, 2008, 01:19 PM
Samuel Thibault
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Barry deFreese, le Mon 21 Jul 2008 11:33:57 -0400, a :
Samuel Thibault wrote:
><snip>
>Indeed, but functions implicitely return at the end of it
>
>And in that case, that's why I said to add noreturn to i386_exception
>and similar. exception() is one of those "similars".


K fair enough but exception() does do a few returns, you want me to go
ahead and remove those also?

See the comment, they shouldn't be reached, so yes you can, but also add
noreturn to the functions that are called just before, etc. ;)

Samuel

Reply With Quote
  #5  
Old July 21st, 2008, 01:19 PM
Barry deFreese
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Samuel Thibault wrote:
Barry deFreese, le Mon 21 Jul 2008 11:33:57 -0400, a :

>Samuel Thibault wrote:
>

<snip>
Indeed, but functions implicitely return at the end of it

And in that case, that's why I said to add noreturn to i386_exception
and similar. exception() is one of those "similars".

>K fair enough but exception() does do a few returns, you want me to go
>ahead and remove those also?
>
>

See the comment, they shouldn't be reached, so yes you can, but also add
noreturn to the functions that are called just before, etc. ;)
>

Samuel

K I'm getting closer. I added noreturn to exception and
exception_raise but I'm still getting the warning that exception_raise
is returning. I thought maybe it was assert() but Asser() has
__attribute__ ((noreturn)). Any idea on what else I'm missing?

Sorry to be such a pain.

Thanks,

Barry

Reply With Quote
  #6  
Old July 21st, 2008, 01:19 PM
Samuel Thibault
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Gnumach cleanup 10 second attempt

Barry deFreese, le Mon 21 Jul 2008 12:30:36 -0400, a :
Samuel Thibault wrote:
>See the comment, they shouldn't be reached, so yes you can, but also add
>noreturn to the functions that are called just before, etc. ;)
>

K I'm getting closer. I added noreturn to exception and
exception_raise but I'm still getting the warning that exception_raise
is returning.

There are return statements with /*NTREACHED*/ above to drop again and
functions to add noreturn to again, yes, exception_raise_continue_slow
for instance, etc., etc., etc. Yes you'll probably have to add noreturn
to a big bunch of functions, that's fine since they're supposed to be.

I thought maybe it was assert()

assert() doesn't "trigger" return.

but Asser() has __attribute__ ((noreturn)).

That's not at stake here since there's an if before it in the assert()
macro

Samuel

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Unix > Gnumach cleanup 10 second attempt


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek