<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: [LC++]enum, #define, const, static const, or member const???</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; &gt; - You are told when you forget a value in a switch.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; I tested this with gcc.&nbsp; It didn't tell me --- and I</FONT>
<BR><FONT SIZE=2>&gt; even had &quot;-Wall&quot; selected!</FONT>
</P>

<P><FONT SIZE=2>Then you use anonymous enums, which are really named numbers,</FONT>
<BR><FONT SIZE=2>not a new type. If you give this new enum list a name, it becomes</FONT>
<BR><FONT SIZE=2>a type, and GCC then warns.</FONT>
</P>

<P><FONT SIZE=2>&gt; Isn't &quot;static int const&quot; equivalent to &quot;int const&quot;?&nbsp; Ie doesn't</FONT>
<BR><FONT SIZE=2>&gt; the latter default to static?</FONT>
</P>

<P><FONT SIZE=2>The default is not static. It will be exported.</FONT>
<BR><FONT SIZE=2>Making something private implies it is part of a class, so it is</FONT>
<BR><FONT SIZE=2>not in the global namespace anyway.</FONT>
<BR><FONT SIZE=2>static (at global scope) means that the particular identifier</FONT>
<BR><FONT SIZE=2>won't be exported, so won't pollute the global namespace. Note</FONT>
<BR><FONT SIZE=2>that the static keyword in other places does not mean that.</FONT>
</P>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>

</BODY>
</HTML>