[Bug c/31870] Failure to diagnose taking address of register variable

2014-10-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31870 Marek Polacek changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread bangerth at dealii dot org
--- Comment #5 from bangerth at dealii dot org 2007-05-10 03:52 --- (In reply to comment #4) > I'm not sure but I suspect it indicates that the pointer decay is not > happening. Or that the warning is only emitted if something is actually done with the result. I don't know, someone else

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread neil at gcc dot gnu dot org
--- Comment #4 from neil at gcc dot gnu dot org 2007-05-10 00:00 --- Agreed it's minor; I think I flagged the PR that way. I'm not sure but I suspect it indicates that the pointer decay is not happening. If so and you were using GCC to do source code analysis, you would have an incorre

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread bangerth at dealii dot org
-- bangerth at dealii dot org changed: What|Removed |Added Status|WAITING |NEW Ever Confirmed|0 |1 Last reconfirmed

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread bangerth at math dot tamu dot edu
--- Comment #3 from bangerth at math dot tamu dot edu 2007-05-09 23:46 --- Subject: Re: Failure to diagnose taking address of register variable > > for that case, C99's clause 6.3.2.1/3 says that that's possible for > > register storage class arrays but that the result is undefined.

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread neil at daikokuya dot co dot uk
--- Comment #2 from neil at daikokuya dot co dot uk 2007-05-09 23:39 --- Subject: Re: Failure to diagnose taking address of register variable bangerth at dealii dot org wrote:- > Uh, can you elaborate? We get the warning you want if we have > int d (void) { register int a[2]; retur

[Bug c/31870] Failure to diagnose taking address of register variable

2007-05-09 Thread bangerth at dealii dot org
--- Comment #1 from bangerth at dealii dot org 2007-05-09 16:16 --- Uh, can you elaborate? We get the warning you want if we have int d (void) { register int a[2]; return a; } instead. In your case, i.e. "return a,1", we return 1, but we still need evaluate the expression "a". I assume