Gcc-3.1.1

  1. /usr/local/include/SDL/SDL_types.h:64: warning: ISO C++ does not support
    `long long’

  2. when I am using sdl-config --cflags, gcc says:
    cc1plus: warning: changing search order for system directory "/usr/local/include"
    cc1plus: warning: as it has already been specified as a non-system directory

What are solutions for that?

I’m not sure what the solutions are for that, besides perhaps turning
down the warnings, but GCC 3.1 does give more … output than it should.
I’m not sure what to tell you, only that I’ve gotten the same thing.

– chris (@Christopher_Thielen)On Tue, 2002-08-06 at 08:24, Jacek Pop?awski wrote:

  1. /usr/local/include/SDL/SDL_types.h:64: warning: ISO C++ does not support
    `long long’

  2. when I am using sdl-config --cflags, gcc says:
    cc1plus: warning: changing search order for system directory "/usr/local/include"
    cc1plus: warning: as it has already been specified as a non-system directory

What are solutions for that?

  1. /usr/local/include/SDL/SDL_types.h:64: warning: ISO C++ does not support
    `long long’
    This is a normal warning if strict ansi is enabled. I don’t have
    experience with gcc 3, but perhaps strict ansi is turned on by default
    instead of off? If so the compiler may not be setting the define SDL
    uses to choose whether or not to use long long as a valid type.
    My suggestion would be to try adding a -D__STRICT_ANSI__ to the flags
    for the build to force SDL to revert to using a struct to emulate Uint64
    instead of true long long.

Disclaimer: this may be totally wrong.

  1. when I am using sdl-config --cflags, gcc says:
    cc1plus: warning: changing search order for system directory "/usr/local/include"
    cc1plus: warning: as it has already been specified as a non-system directory

What are solutions for that?

I’m not sure what the solutions are for that, besides perhaps turning
down the warnings, but GCC 3.1 does give more … output than it should.
I’m not sure what to tell you, only that I’ve gotten the same thing.
More warnings are good. The more warnings the better. If the compiler
is griping about something I find it’s usually better to fix it than to
shut off warnings.On Tue, 2002-08-06 at 13:36, Chris Thielen wrote:
On Tue, 2002-08-06 at 08:24, Jacek Pop?awski wrote:

– chris (chris at luethy.net)


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

End of Rant.

Jimmy
Jimmy’s World (http://www.jimmysworld.org)
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/7038b7cf/attachment.pgp

I use “-pedantic”. After turning it off I see no more warnings. Thanks.On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.

–>Neil> On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?
I use “-pedantic”. After turning it off I see no more warnings. Thanks.


Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me

Since this warning is a pedantic warning about standards, this only applies
if you want your project to be truly portable. If you could care less if a
different compiler supports “long long”, so what?

Of course, if the warning refers to something in the actual logic (like
warnings about casts), then you’re right: fix the actual problem instead of
disabling the warnings.

cu,
NicolaiOn Tuesday 06 August 2002 22:59, Neil Bradley wrote:

On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by
default instead of off?

I use “-pedantic”. After turning it off I see no more warnings. Thanks.

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?
I use “-pedantic”. After turning it off I see no more warnings. Thanks.

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.

I don’t know about gcc 3, but the gcc 2.95.2 documentation has this to
say on the subject of -pedantic:On Wednesday, August 7, 2002, at 06:59 , Neil Bradley wrote:

On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:


This option is not intended to be useful; it exists only to satisfy
pedants who would otherwise claim that GNU CC fails to support the ANSI
standard.

Some users try to use -pedantic to check programs for strict ANSI C
conformance. They soon find that it does not do quite what they want: it
finds some non-ANSI practices, but not all–only those for which ANSI C
requires a diagnostic.


It seems to me that ignoring -pedantic is a Right and Proper thing to do.

Screwtape,
…who recently learned his lesson with an epic battle between -ansi and
snprintf.

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?

I use “-pedantic”. After turning it off I see no more warnings. Thanks.

Regardless of all the conversation going on around here, I use the
pedantic option too and I don’t receive the warning. If you’re
interested in eliminating every possible warning and being as portable
as possible like I am, add -ansi and -pedantic. The warnings will go
away because ifdef’s in SDL_types will pick up the define and compensate
not to use long long.

I’ve tested this, it works.On Tue, 2002-08-06 at 16:36, Jacek Pop?awski wrote:

On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

End of Rant.

Jimmy
Jimmy’s World (http://www.jimmysworld.org)
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/68376df4/attachment.pgp

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?
I use “-pedantic”. After turning it off I see no more warnings. Thanks.

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.

I 100% agree with this opinion. It takes very little work to leave the
warnings enabled and fix them as they appear. Much less work than is
gained in portability in the long run. -Wall -pedantic -ansi is the only
way to go.On Tue, 2002-08-06 at 16:59, Neil Bradley wrote:

On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:

–>Neil


Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

End of Rant.

Jimmy
Jimmy’s World (http://www.jimmysworld.org)
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/ede828f6/attachment.pgp

-pedantic is listed in various versions of the GCC manual as not being
intended to be useful for anything since it prohibits all extensions,
including those used conditionally or enhance security.

The gcc 3.1.1 manual no longer tells you that you shouldn’t use -pedantic,
but its function has not changed. If its use was strongly discouraged
before because of the artificial limitations it imposes, why should we not
continue to use it, knowing that it will deny us essential features such
as 64 bit integers?On Tue, Aug 06, 2002 at 01:59:41PM -0700, Neil Bradley wrote:

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?
I use “-pedantic”. After turning it off I see no more warnings. Thanks.

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.


Joseph Carter Hey, that’s MY freak show!

The deafening silence taught me not to ask a bunch of geeks for advice
from their girlfriends

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/942b4a87/attachment.pgp

Add to that -Werror so you will be guaranteed that your code is prohibited
from using such useless extensions as those which increase security and
support sometimes needed features.

-Wall -Werror is useful. -Wall -W -Werror is too. -pedantic is only for
people who masturbate with a copy of the standard. It limits code and
prevents access to such basic things as 64 bit int types and snprintf. I
do not think this is useful. Those who refuse to acknowledge the
existance of essential security features which are extremely widely
supported because their precious standards are too important are fools and
are not worth the time of the general coding population to educate.

It’s alos not usually worth the time spent auditing their code to fix the
potential and actual buffer overflow conditions which are possible because
they’re forbidden to use secure string functions. Have you had your
machine rooted today?On Tue, Aug 06, 2002 at 11:24:02PM -0400, Jimmy wrote:

So when the smoke alarm goes off, instead of putting out the fire, one
should instead take out the batteries. Doesn’t seem like getting rid of
warnings by shutting them off is a good idea.

I 100% agree with this opinion. It takes very little work to leave the
warnings enabled and fix them as they appear. Much less work than is
gained in portability in the long run. -Wall -pedantic -ansi is the only
way to go.


Joseph Carter Here we go again

<Culus_> We are also hoping to release a version of linux where shell is
replaced by perl to a large degree. Adding to that, there are a
few of us who would like to see a pure perl platform… PerlOS :slight_smile:

  • Culus_ looks on in horror
    Culus_: on the up side, you can type damn near anything in at the
    command prompt :slight_smile:

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/b2fee93a/attachment.pgp

So when the smoke alarm goes off, instead of putting out the fire, one

do not think this is useful. Those who refuse to acknowledge the
existance of essential security features which are extremely widely
supported because their precious standards are too important are fools and
are not worth the time of the general coding population to educate.

Ok. Obviously I found a nerve, struck it and then did a dance on it.
That wasn’t my intention.

What I was saying is for general cases, and especially applies in C++
over C, but in C too. To use things like snprintf portably make a
wrapper for it and keep that in a section that you expect to get
warnings from. Using long long isn’t portable. It’s simple. If you
want to be completely portable you can’t use it. Simple. SDL behaves
the way it does in SDL_types.h for a really good reason, and that’s why
you can build it with -pedantic -Wall -Werror -Wfish -Wcats -Wmice and
-Weverything else in the world.

If you want to vent anger about ignorance, vent it about sprintf being
the standard rather than snprintf. It’s stupid, but that’s how it is.

Alright, it just occurred to me how FANTASTICALLY off topic this is. So
I’ll cut my rebuttal rant short.On Tue, 2002-08-06 at 23:53, Joseph Carter wrote:

On Tue, Aug 06, 2002 at 11:24:02PM -0400, Jimmy wrote:

It’s alos not usually worth the time spent auditing their code to fix the
potential and actual buffer overflow conditions which are possible because
they’re forbidden to use secure string functions. Have you had your
machine rooted today?


Joseph Carter Here we go again

<Culus_> We are also hoping to release a version of linux where shell is
replaced by perl to a large degree. Adding to that, there are a
few of us who would like to see a pure perl platform… PerlOS :slight_smile:

  • Culus_ looks on in horror
    Culus_: on the up side, you can type damn near anything in at the
    command prompt :slight_smile:

End of Rant.

Jimmy
Jimmy’s World (http://www.jimmysworld.org)
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020806/20f06aaa/attachment.pgp

Jacek Pop?awski writes:> On Tue, Aug 06, 2002 at 02:57:43PM -0400, Jimmy wrote:

This is a normal warning if strict ansi is enabled. I don’t have
experience with gcc 3, but perhaps strict ansi is turned on by default
instead of off?

I use “-pedantic”. After turning it off I see no more warnings. Thanks.

To get rid of long long versions, you can also simply add
-Wno-long-long. Toggling individual warnings might be nicer than
removing flags like pedantic all together.


[ Below is a random fortune, which is unrelated to the above message. ]
Sweet April showers do spring May flowers.
– Thomas Tusser