• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Compiler problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiler problem?


  • Subject: Compiler problem?
  • From: James Pengra <email@hidden>
  • Date: Thu, 12 May 2005 12:30:49 -0700

I have just started to using Xcode 2.0, migrating from ver. 1.1. I don't know if the following problem happened with Xcode 1.1.

In one of my classes the header file declares a series of indexed doubles followed by a single integer variable, thus:

	double	k1[4];
	double 	k2[4];
	int	J;

It compiles without error but, when I run the program, the value of J gets all messed up with very large values, and that happens just when the method that uses the k's gets called. Being of a suspicious nature, I moved the declaration of the integer to the front of the group as:

	int	J;
	double	k1[4];
	double	k2[4];

    This solved the problem.

It seems to me that clearly, in the first case, the dimensioned variables are slopping over their allotted space into that of the integer. I should think that a well designed compiler would prevent this.
Is this a bug or am I making an error or asking too much?


  Thanks, Jim

OS X 4.0, G4 AGP, 768 MB
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Compiler problem?
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: Why would a defined selector not be found at runtime?
  • Next by Date: Re: Compiler problem?
  • Previous by thread: Using Core-Image in GUI
  • Next by thread: Re: Compiler problem?
  • Index(es):
    • Date
    • Thread