https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31870
Marek Polacek changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
--- 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
--- 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
--
bangerth at dealii dot org changed:
What|Removed |Added
Status|WAITING |NEW
Ever Confirmed|0 |1
Last reconfirmed
--- 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.
--- 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
--- 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