This is the mail archive of the gcc-help@gcc.gnu.org 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]

no warning even with -Wcast-align in windows/hp-ux


Hi,

char char1;
char char2;
int *ip;

void foo(void) {
  ip = &char1;  // line 6
  *ip = 65;
  ip = &char2; // line 8
  *ip = 66;
  return;
}

No alignment warning at line 6, 8. 
Tried in windows (GCC 4.5.3), hp-ux (GCC 4.7.1).

Regards,
Kannan


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