Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348774 - don't show warning neither error->>warning or error for all please....
Summary: don't show warning neither error->>warning or error for all please....
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows Server 2003
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 12:11 EDT by JMM CLA
Modified: 2011-06-21 15:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JMM CLA 2011-06-08 12:11:15 EDT
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.
Comment 1 Chris Recoskie CLA 2011-06-21 15:16:29 EDT
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.