This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16602] Spurious warnings about pointer to array -> const pointer to array conversion

------- Comment #7 from jozef dot behran at krs dot sk  2007-09-26 12:33 -------
Hm, I must apologize for argumenting about wrong point of this issue. Now I can
see why other sometimes say "think before you type" :)

The problem here is not whether applying const to "array of int" makes "const
array of int" or "array of const int". The problem here is why gcc does not
apply that "const" automatically and rather complains about incompatible
pointer types.

I am reopening the bug cause I still don't have a clue why "pointer to array of
ints" typed expression is assignment incompatible with a "pointer to array of
const ints" typed lvalue. Especially when "pointer to int" typed expression IS
assignment compatible with "pointer to const int" typed lvalue. This is what is
this bug all about.


jozef dot behran at krs dot sk changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]