| Summary: | don't show warning neither error->>warning or error for all please.... | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | JMM <zazun2> |
| Component: | cdt-debug | Assignee: | cdt-debug-inbox <cdt-debug-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | Ken Ryall <ken.ryall> |
| Severity: | critical | ||
| Priority: | P3 | CC: | cdtdoug, pawel.1.piech, recoskie |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Server 2003 | ||
| Whiteboard: | |||
Sorry, I can't make out what this bug report is actually trying to claim is a problem. Using some inference... I *think* the user is complaining that Eclipse didn't tell him that his code was going to attempt to access his array beyond its bounds (his loop tries to access elements < 6 when the array is only of size 3). This is not a problem of Eclipse. That's just writing bad code. The compiler will happily compile that code without error. It's possible that some static analysis rules could help with this but I don't think Codan has done this yet. |
Build Identifier: 20110218-0911 I have: #define MAX_ORDENES 1 //COMO MINIMO PROFUNDIDAD MAXIMA QUE ES 13 #define MAX_DIFERENCIAL 3 //PROFUNDIDAD_MAXIMA + 2 #define PROFUNDIDAD 6 double diferencias[MAX_ORDENES][MAX_DIFERENCIAL]; for (int numDiferencia = 0; numDiferencia <PROFUNDIDAD;numDiferencia++) { diferencias[0][numDiferencia]=0; } MAX_DIFERENCIAL=3 and PROFUNDIDAD=6 don't warning show in eclipse and i lost data in memory. warning for all please.... Greetings. Reproducible: Always Steps to Reproduce: I have: #define MAX_ORDENES 1 //COMO MINIMO PROFUNDIDAD MAXIMA QUE ES 13 #define MAX_DIFERENCIAL 3 //PROFUNDIDAD_MAXIMA + 2 #define PROFUNDIDAD 6 double diferencias[MAX_ORDENES][MAX_DIFERENCIAL]; for (int numDiferencia = 0; numDiferencia <PROFUNDIDAD;numDiferencia++) { diferencias[0][numDiferencia]=0; } MAX_DIFERENCIAL=3 and PROFUNDIDAD=6 don't warning show in eclipse and i lost data in memory. warning or error for all please.... Greetings.