[CDRIVER-969] declaration of 'index' shadows a global declaration Created: 28/Oct/15 Updated: 18/Nov/15 Resolved: 30/Oct/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.3.0-beta0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Hannes Magnusson | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
| Comments |
| Comment by Githook User [ 30/Oct/15 ] | ||
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: This only happens on certain GCC versions before 4.8, and is a bug | ||
| Comment by A. Jesse Jiryu Davis [ 28/Oct/15 ] | ||
|
This was fixed in GCC 4.8 "The option -Wshadow no longer warns if a declaration shadows a function declaration, unless the former declares a function or pointer to function": https://gcc.gnu.org/gcc-4.8/changes.html A complaint about a variable named "index" is exactly the valid real-world use case they cite as justification for the fix. I guess we're using a pretty old GCC some places. | ||
| Comment by Hannes Magnusson [ 28/Oct/15 ] | ||
|
This appears to happen only on certain version of gcc, and likely caused by :
|