Date: Thu, 5 Aug 1999 18:01:23 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Laurynas Biveinis cc: djgpp-workers AT delorie DOT com Subject: Re: CPU ID program, second version In-Reply-To: <37A96C09.95FC9A2@softhome.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 5 Aug 1999, Laurynas Biveinis wrote: > > Also, your switch statement is incomplete -- add a default case and > > call it "ix86" or something like that. > > It currently handles all cases - first CPU's with CPUID instruction > are 486 and Pentiums. And currently there is no CPU which reports > bigger value in "instruction family" field than 0x6 (for i686). Nevertheless, switch statements with no default are generally a bad idea. A library function shouldn't have undefined behavior in unforseen circumstances. I think returning i486 as the default in the last switch is good enough. Do you agree?