[Mono-dev] Possible regression in gmcs with private const member variables.

Tom Philpot tom.philpot at logos.com
Mon Jan 11 15:10:01 EST 2010

Under gmcs r149310 pulled from SVN trunk this morning, I get a warning about unused const members that did not appear in 147679.

ws1048-snow:monoscripts tom.philpot$ /opt/mono-r149310/bin/gmcs ~/CompilerTest.cs
/Users/tom.philpot/CompilerTest.cs(18,30): warning CS0169: The private constant `Application.CompilerTest.c_strFoo' is never used
Compilation succeeded - 1 warning(s)
ws1048-snow:monoscripts tom.philpot$ /opt/mono-r147679/bin/gmcs ~/CompilerTest.cs
ws1048-snow:monoscripts tom.philpot$ 

Test code is:

namespace Application {
	public class CompilerTest {
		public CompilerTest() {
			m_strPath = System.IO.Path.Combine("/Home/directory", c_strFoo);

		public string Path {
			get { return m_strPath; }

		string m_strPath;
		const string c_strFoo = "Foo";

		public static void Main (string[] args) {
			new CompilerTest();

Is this a regression?

More information about the Mono-devel-list mailing list