This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/19820] New: Enumeration constants as not integral types, print artificial array doesn't work
- From: "pero at devnullmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 13 Mar 2016 21:28:47 +0000
- Subject: [Bug exp/19820] New: Enumeration constants as not integral types, print artificial array doesn't work
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19820
Bug ID: 19820
Summary: Enumeration constants as not integral types, print
artificial array doesn't work
Product: gdb
Version: 7.11
Status: NEW
Severity: minor
Priority: P2
Component: exp
Assignee: unassigned at sourceware dot org
Reporter: pero at devnullmail dot com
Target Milestone: ---
gcc is 5.3.0 with gnu89 standard.
In the source there is a global enumeration constant sz. Locally
I have an array decayed to pointer m. But if I try to do
`print *m@sz', GDB complains incorrectly that the right operand
to the @ operator is not an integral type, so I have to cast to
int.
Program text:
enum {
sz = 17
};
void p(int m[sz][sz], int n) {
int i;
for (i=1; i<n; i++) {
int j;
for (j=i-1; 0<=j; j--) {
m[i][j] = abs(3*m[i-1][j] +2*m[i][j+1]) % 9340506;
}
}
}
void f(int n) {
int m[sz][sz];
g(m, n);
p(m, n);
r(m, n);
}
--
You are receiving this mail because:
You are on the CC list for the bug.