[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sheflug] gcc warnings on Solaris...



Hi,
    I am getting loads of warnings on Solaris compiling some code.
These don't appear in Linux, so I was wondering whether someone might
be able to explain its cause and solution.

    Basically, every time there is a cast in my code, I get something
of the form
warning: cast increases required alignment of target type

    I know it's only a warning, and I cam compiling with plenty of
debug flags in gcc. The compiler flags were taken from the GSL manual,
and they are optimal for flagging errors in numerical programs. Here's
a sample:
gcc -ansi -pedantic -Wall -W -Wmissing-prototypes -Wstrict-prototypes \
-Wtraditional -Wconversion -Wshadow -Wpointer-arith -Wcast-qual \
-Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums \
-fno-common -Dinline= -g -O4

    I guess that if I were to take the -Wcase-align flag out, it would
shut up. However, I am annoyed to have a warning in my code, and would
like to know where it arises from.

    Cheers
    JOsé

-- 
José L Gómez Dans			PhD student
Tel: +44 114 222 5582			Radar & Communications Group
FAX; +44 870 132 2990			Department of Electronic Engineering
					University of Sheffield UK
___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.