Commits

mic...@ubuntu.ubuntu-domain  committed 57bcced

Fixed DMD1

  • Participants
  • Parent commits 298583a

Comments (0)

Files changed (106)

File d/d-objfile.cc

 		size += dt_size(dt->DTvalues);
 		break;
 	    default:
-	    break;
-		//assert(0); //ICE in uni.d, FIX THIS; GDC
+		assert(0);
 	}
 	dt = dt->DTnext;
     }

File d/dmd-script

File contents unchanged.

File d/dmd/.svn/entries

 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 6ebc02238311f0b812216ea5c7488a62
 2008-12-13T00:07:43.427675Z
 244
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 61334dbda667c3a3fe312ab7ff42be0b
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 65367b79cd0e906dd720d731d292f71f
 2008-03-10T02:46:39.124859Z
 206
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 e9bd5c0da07e9aed7193a804e5941d93
 2006-06-02T03:31:29.076806Z
 1
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 c264cd4495cff44cbae5549fb1f8e807
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f2c540754399d2c05f786cf9d5a6b474
 2008-12-13T00:07:43.427675Z
 244
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 287100e96c4169b5a65f4a0155c6b4d3
 2008-05-10T20:02:05.296866Z
 220
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 5a8497b7ec0e0519f1656512a018cb83
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9c0471f496928df0c55d62c05fff6ce3
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 6b00ecf9ae6b2eeb1e7dce2af637a2cf
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 6132ce0a72538ace8930394418c4df9c
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f00c01b3ab80410e8c21756db26388d5
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 0ea3c492f0c08ba3be267c5eef3a4ee3
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 09bf243bb583cf7253f3d25d91977c9f
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 0b98083b0c7b362fb49e748be5042c5a
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f339aa76a1e330f6946450a6d79531ee
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 8e1a535d5d74acebe2a944f088315a40
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 ac41ce249a530c0eb82cd60f91c4689b
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 cc17b5b747e852e77c09f46e265c9aac
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 550fa1ffd34c2adb87a635afa6701bb3
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 fe9840774788c23ec8103e82c84f2e62
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 48d2acf9893a6a736fd4bfe50fc0849c
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 996fef48f41d1d2595fe444418a463e7
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 6915d767ad6034aaf90a9f61afe6d735
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 063495a3ad0a7dc789dad3c4fa307d6a
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 0f5750be06315a86541bdea3bd2c9e9d
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 79f58593abc71041eec0fcdf501c9ca8
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 7642d9afb910102cbc1fff3e81931852
 2007-10-15T00:27:46.201228Z
 188
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 4cfceeb299fdf168ac1c1d34db0481fc
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 63b151dd939501aa1a92193bf6567949
 2008-07-20T19:21:54.841665Z
 241
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 a7b8970988d00b405f37b845795a0718
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 cadee7d4c4a34bdbb64c6dc1e7cb6125
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 c4c0beb92384eae27b0652100723b868
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 bcf3f1fb5c11f3bd57e871cd2c2404fd
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 1404762a9fdfcad5c35204fe2f2bb3f8
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 296bf9b523cc57d69886b840dba09497
 2008-03-10T02:46:39.124859Z
 206
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 e353121fc62f0cf78ad587ac083b835e
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 77b46338b8e5e5de327e4e175c7efc92
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 a19a02168584a27807802ecb7f1baa0f
 2008-03-10T02:46:39.124859Z
 206
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 5d7dcfed2a7fe8e3fc59ecd9db19fdbf
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 61785019a4cd2a6bc77a33b23168b7a4
 2007-10-15T00:27:46.201228Z
 188
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9f2a9f336be02202978d3b4672b47d6c
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 2e5f2aeab8a0facac91c29ee09cbd3a2
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3eac7a350bf1521ea121f75007e27711
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 4ed7be2abcdd9d5a4d4500cf35c8826e
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 2849b1714e1b6205702885628e6e70ac
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 1d3d7740c291e69c0fc3b60597293e38
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3a975f12e9683a21759426c68b00d957
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 edfea4156a05f8f3e16abd2a5d62a757
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 bbe52d3d90f210fc0b848d336fe89d3b
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 35fa1da14357a2e9d0279fe9d135643c
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 7995a847e23d1b675b7feabd9f10b2b4
 2008-05-26T18:23:55.699351Z
 226
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 cb9fc03dff09153f3d90674ec9a5ff43
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9b7fb8e0c0581afef9680e0fece27d43
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 70bc35fe5aea9d2bfe51ae3b3f8e60ba
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3518472ee5cb1cb02d6f43883f1a5b60
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 d41c482872d993a5c8f3e06874be8201
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 04e6f0f37d521ea5ded0b186722246fd
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 7fd59326442ed5239688790abe37a6f2
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 e918b9574b8646df155151698c1a51af
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 2139eb9bffc6e16f10d1569014898f8e
 2008-03-10T02:46:39.124859Z
 206
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 ea284f28352f577b8a3a2a3aa8131f3b
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 0133fa865ac55b23e894727c8ac53461
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f627136e18dd211f7cc6857b05254bd0
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 2b4c6ffbcfcbdee469f02565f253d81a
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 a17e0c95b30deb82c8e85297edee878b
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3624c2f919736530cd84e29c17a9457d
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 af075a23feb5e665235d974ea4309a23
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f334b9323bd6a3d2bd1dac668f006be0
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 f224df9acfb7a470325dbd534d12cd28
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 27af71e098c67e903da87c008985f43b
 2008-04-27T20:34:35.913149Z
 217
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 d233745d5ce343785264dd97fea43d88
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 03a19b7552265c36f12dc5c2313dbfb5
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 7ede6887552528e8e005141161874162
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 1a545008cd8027c22d3d8047570a462b
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 5bbd1eb3816dd59d13f86fa2655f9273
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 6850a8c8e61e789fffd0af959ba5e8f7
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 b5554f98a65795a1c9dcafacfe706ec9
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 20ad3b8318f5101604466f76d81f7444
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 8b92d98da8d3f8f42339e29293e7a6d5
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 61e27911c7e2ed0a5ccf807d8e184da3
 2008-05-10T20:02:05.296866Z
 220
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 041eb589d4ad4bc0562f48043684355c
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 dc7d128c7b19ba00b962082eb315ffcb
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 91aefc7803e70566008736f124c046f1
 2008-05-26T18:23:55.699351Z
 226
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 ad5b5591d2dd0401a460ef46fad20a2e
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 ff891eace7e28bf2d07c910545d6aa1a
 2008-04-27T20:34:35.913149Z
 217
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3c46a6965159becec7bb60477b992158
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9f1015d8d2b8296053e6922feef0941e
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9d6f7daad32515799f239a52e6629a44
 2008-05-10T20:02:05.296866Z
 220
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 d5e41fa569e63eee5af332cc2e956daa
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 4ac71fb71409e0bc7ef15d972d4cc128
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 fd94ad6eeae3819d8c3b9bdc936aec7d
 2008-07-21T23:13:44.863626Z
 242
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 c0d3e9c41f83f58ebf938c9fc0d36c70
 2008-05-03T13:06:31.128930Z
 218
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 9743b3f9a7a3c19344063985d46efa43
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 2e9c3ec223f506812bdd7ab77041da31
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 3066d9be542ff2100c3ff807461387be
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 74daa076df61ac6501444cd9ede757f0
 2008-06-01T16:00:48.084332Z
 229
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 eb787a63bdb4b0ecc72a0cd57b515264
 2007-10-14T14:49:16.554402Z
 186
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 53cfed7e6c083a8eca39b25205efecde
 2006-06-02T03:31:29.076806Z
 1
 
 
 
-2009-09-05T21:45:18.000000Z
+2009-09-13T16:22:29.000000Z
 e8c65aad5362510c121e54784058cfbd
 2008-06-01T16:00:48.084332Z
 229

File d/dmd/access.c

-
-// Copyright (c) 1999-2006 by Digital Mars
-// All Rights Reserved
-// written by Walter Bright
-// http://www.digitalmars.com
-// License for redistribution is by either the Artistic License
-// in artistic.txt, or the GNU General Public License in gnu.txt.
-// See the included readme.txt for details.
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "root.h"
-#include "mem.h"
-
-#include "enum.h"
-#include "aggregate.h"
-#include "init.h"
-#include "attrib.h"
-#include "scope.h"
-#include "id.h"
-#include "mtype.h"
-#include "declaration.h"
-#include "aggregate.h"
-#include "expression.h"
-#include "module.h"
-
-#define LOG 0
-
-/* Code to do access checks
- */
-
-int hasPackageAccess(Scope *sc, Dsymbol *s);
-
-/****************************************
- * Return PROT access for Dsymbol smember in this declaration.
- */
-
-enum PROT AggregateDeclaration::getAccess(Dsymbol *smember)
-{
-    return PROTpublic;
-}
-
-enum PROT StructDeclaration::getAccess(Dsymbol *smember)
-{
-    enum PROT access_ret = PROTnone;
-
-#if LOG
-    printf("+StructDeclaration::getAccess(this = '%s', smember = '%s')\n",
-	toChars(), smember->toChars());
-#endif
-    if (smember->toParent() == this)
-    {
-	access_ret = smember->prot();
-    }
-    else if (smember->isDeclaration()->isStatic())
-    {
-	access_ret = smember->prot();
-    }
-    return access_ret;
-}
-
-enum PROT ClassDeclaration::getAccess(Dsymbol *smember)
-{
-    enum PROT access_ret = PROTnone;
-
-#if LOG
-    printf("+ClassDeclaration::getAccess(this = '%s', smember = '%s')\n",
-	toChars(), smember->toChars());
-#endif
-    if (smember->toParent() == this)
-    {
-	access_ret = smember->prot();
-    }
-    else
-    {
-	enum PROT access;
-	int i;
-
-	if (smember->isDeclaration()->isStatic())
-	{
-	    access_ret = smember->prot();
-	}
-
-	for (i = 0; i < baseclasses.dim; i++)
-	{   BaseClass *b = (BaseClass *)baseclasses.data[i];
-
-	    access = b->base->getAccess(smember);
-	    switch (access)
-	    {
-		case PROTnone:
-		    break;
-
-		case PROTprivate:
-		    access = PROTnone;	// private members of base class not accessible
-		    break;
-
-		case PROTpackage:
-		case PROTprotected:
-		case PROTpublic:
-		case PROTexport:
-		    // If access is to be tightened
-		    if (b->protection < access)
-			access = b->protection;
-
-		    // Pick path with loosest access
-		    if (access > access_ret)
-			access_ret = access;
-		    break;
-
-		default:
-		    assert(0);
-	    }
-	}
-    }
-#if LOG
-    printf("-ClassDeclaration::getAccess(this = '%s', smember = '%s') = %d\n",
-	toChars(), smember->toChars(), access_ret);
-#endif
-    return access_ret;
-}
-
-/********************************************************
- * Helper function for ClassDeclaration::accessCheck()
- * Returns:
- *	0	no access
- * 	1	access
- */
-
-static int accessCheckX(
-	Dsymbol *smember,
-	Dsymbol *sfunc,
-	AggregateDeclaration *dthis,
-	AggregateDeclaration *cdscope)
-{
-    assert(dthis);
-
-#if 0
-    printf("accessCheckX for %s.%s in function %s() in scope %s\n",
-	dthis->toChars(), smember->toChars(),
-	sfunc ? sfunc->toChars() : "NULL",
-	cdscope ? cdscope->toChars() : "NULL");
-#endif
-    if (dthis->hasPrivateAccess(sfunc) ||
-	dthis->isFriendOf(cdscope))
-    {
-	if (smember->toParent() == dthis)
-	    return 1;
-	else
-	{
-	    ClassDeclaration *cdthis = dthis->isClassDeclaration();
-	    if (cdthis)
-	    {
-		for (int i = 0; i < cdthis->baseclasses.dim; i++)
-		{   BaseClass *b = (BaseClass *)cdthis->baseclasses.data[i];
-		    enum PROT access;
-
-		    access = b->base->getAccess(smember);
-		    if (access >= PROTprotected ||
-			accessCheckX(smember, sfunc, b->base, cdscope)
-		       )
-			return 1;
-
-		}
-	    }
-	}
-    }
-    else
-    {
-	if (smember->toParent() != dthis)
-	{
-	    ClassDeclaration *cdthis = dthis->isClassDeclaration();
-	    if (cdthis)
-	    {
-		for (int i = 0; i < cdthis->baseclasses.dim; i++)
-		{   BaseClass *b = (BaseClass *)cdthis->baseclasses.data[i];
-
-		    if (accessCheckX(smember, sfunc, b->base, cdscope))
-			return 1;
-		}
-	    }
-	}
-    }
-    return 0;
-}
-
-/*******************************
- * Do access check for member of this class, this class being the
- * type of the 'this' pointer used to access smember.
- */
-
-void AggregateDeclaration::accessCheck(Loc loc, Scope *sc, Dsymbol *smember)
-{
-    int result;
-
-    FuncDeclaration *f = sc->func;
-    AggregateDeclaration *cdscope = sc->getStructClassScope();
-    enum PROT access;
-
-#if LOG
-    printf("AggregateDeclaration::accessCheck() for %s.%s in function %s() in scope %s\n",
-	toChars(), smember->toChars(),
-	f ? f->toChars() : NULL,
-	cdscope ? cdscope->toChars() : NULL);
-#endif
-
-    Dsymbol *smemberparent = smember->toParent();
-    if (!smemberparent || !smemberparent->isAggregateDeclaration())
-    {
-#if LOG
-	printf("not an aggregate member\n");
-#endif
-	return;				// then it is accessible
-    }
-
-    // BUG: should enable this check
-    //assert(smember->parent->isBaseOf(this, NULL));
-
-    if (smemberparent == this)
-    {	enum PROT access = smember->prot();
-
-	result = access >= PROTpublic ||
-		hasPrivateAccess(f) ||
-		isFriendOf(cdscope) ||
-		(access == PROTpackage && hasPackageAccess(sc, this));
-#if LOG
-	printf("result1 = %d\n", result);
-#endif
-    }
-    else if ((access = this->getAccess(smember)) >= PROTpublic)
-    {
-	result = 1;
-#if LOG
-	printf("result2 = %d\n", result);
-#endif
-    }
-    else if (access == PROTpackage && hasPackageAccess(sc, this))
-    {
-	result = 1;
-#if LOG
-	printf("result3 = %d\n", result);
-#endif
-    }
-    else
-    {
-	result = accessCheckX(smember, f, this, cdscope);
-#if LOG
-	printf("result4 = %d\n", result);
-#endif
-    }
-    if (!result)
-    {
-	error(loc, "member %s is not accessible", smember->toChars());
-halt();
-    }
-}
-
-/****************************************
- * Determine if this is the same or friend of cd.
- */
-
-int AggregateDeclaration::isFriendOf(AggregateDeclaration *cd)
-{
-#if LOG
-    printf("AggregateDeclaration::isFriendOf(this = '%s', cd = '%s')\n", toChars(), cd ? cd->toChars() : "null");
-#endif
-    if (this == cd)
-	return 1;
-
-    // Friends if both are in the same module
-    //if (toParent() == cd->toParent())
-    if (cd && getModule() == cd->getModule())
-    {
-#if LOG
-	printf("\tin same module\n");
-#endif
-	return 1;
-    }
-
-#if LOG
-    printf("\tnot friend\n");
-#endif
-    return 0;
-}
-
-/****************************************
- * Determine if scope sc has package level access to s.
- */
-
-int hasPackageAccess(Scope *sc, Dsymbol *s)
-{
-#if LOG
-    printf("hasPackageAccess(s = '%s', sc = '%p')\n", s->toChars(), sc);
-#endif
-
-    for (; s; s = s->parent)
-    {
-	if (s->isPackage() && !s->isModule())
-	    break;
-    }
-#if LOG
-    if (s)
-	printf("\tthis is in package '%s'\n", s->toChars());
-#endif
-
-    if (s && s == sc->module->parent)
-    {
-#if LOG
-	printf("\ts is in same package as sc\n");
-#endif
-	return 1;
-    }
-
-
-#if LOG
-    printf("\tno package access\n");
-#endif
-    return 0;
-}
-
-/**********************************
- * Determine if smember has access to private members of this declaration.
- */
-
-int AggregateDeclaration::hasPrivateAccess(Dsymbol *smember)
-{
-    if (smember)
-    {	AggregateDeclaration *cd = NULL;
-	Dsymbol *smemberparent = smember->toParent();
-	if (smemberparent)
-	    cd = smemberparent->isAggregateDeclaration();
-
-#if LOG
-	printf("AggregateDeclaration::hasPrivateAccess(class %s, member %s)\n",
-		toChars(), smember->toChars());
-#endif
-
-	if (this == cd)		// smember is a member of this class
-	{
-#if LOG
-	    printf("\tyes 1\n");
-#endif
-	    return 1;		// so we get private access
-	}
-
-	// If both are members of the same module, grant access
-	while (1)
-	{   Dsymbol *sp = smember->toParent();
-	    if (sp->isFuncDeclaration() && smember->isFuncDeclaration())
-		smember = sp;
-	    else
-		break;
-	}
-	if (!cd && toParent() == smember->toParent())
-	{
-#if LOG
-	    printf("\tyes 2\n");
-#endif
-	    return 1;
-	}
-	if (!cd && getModule() == smember->getModule())
-	{
-#if LOG
-	    printf("\tyes 3\n");
-#endif
-	    return 1;
-	}
-    }
-#if LOG
-    printf("\tno\n");
-#endif
-    return 0;
-}
-
-/****************************************
- * Check access to d for expression e.d
- */
-
-void accessCheck(Loc loc, Scope *sc, Expression *e, Declaration *d)
-{
-#if LOG
-    if (e)
-    {	printf("accessCheck(%s . %s)\n", e->toChars(), d->toChars());
-	printf("\te->type = %s\n", e->type->toChars());
-    }
-    else
-    {
-	//printf("accessCheck(%s)\n", d->toChars());
-    }
-#endif
-    if (!e)
-    {
-	if (d->prot() == PROTprivate && d->getModule() != sc->module ||
-	    d->prot() == PROTpackage && !hasPackageAccess(sc, d))
-
-	    error(loc, "%s %s.%s is not accessible from %s",
-		d->kind(), d->getModule()->toChars(), d->toChars(), sc->module->toChars());
-    }
-    else if (e->type->ty == Tclass)
-    {   // Do access check
-	ClassDeclaration *cd;
-
-	cd = (ClassDeclaration *)(((TypeClass *)e->type)->sym);
-#if 1
-	if (e->op == TOKsuper)
-	{   ClassDeclaration *cd2;
-
-	    cd2 = sc->func->toParent()->isClassDeclaration();
-	    if (cd2)
-		cd = cd2;
-	}
-#endif
-	cd->accessCheck(loc, sc, d);
-    }
-    else if (e->type->ty == Tstruct)
-    {   // Do access check
-	StructDeclaration *cd;
-
-	cd = (StructDeclaration *)(((TypeStruct *)e->type)->sym);
-	cd->accessCheck(loc, sc, d);
-    }
-}
+
+// Copyright (c) 1999-2006 by Digital Mars
+// All Rights Reserved
+// written by Walter Bright
+// http://www.digitalmars.com
+// License for redistribution is by either the Artistic License
+// in artistic.txt, or the GNU General Public License in gnu.txt.
+// See the included readme.txt for details.
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "root.h"
+#include "mem.h"
+
+#include "enum.h"
+#include "aggregate.h"
+#include "init.h"
+#include "attrib.h"
+#include "scope.h"
+#include "id.h"
+#include "mtype.h"
+#include "declaration.h"
+#include "aggregate.h"
+#include "expression.h"
+#include "module.h"
+
+#define LOG 0
+
+/* Code to do access checks
+ */
+
+int hasPackageAccess(Scope *sc, Dsymbol *s);
+
+/****************************************
+ * Return PROT access for Dsymbol smember in this declaration.
+ */
+
+enum PROT AggregateDeclaration::getAccess(Dsymbol *smember)
+{
+    return PROTpublic;
+}
+
+enum PROT StructDeclaration::getAccess(Dsymbol *smember)
+{
+    enum PROT access_ret = PROTnone;
+
+#if LOG
+    printf("+StructDeclaration::getAccess(this = '%s', smember = '%s')\n",
+	toChars(), smember->toChars());
+#endif
+    if (smember->toParent() == this)
+    {
+	access_ret = smember->prot();
+    }
+    else if (smember->isDeclaration()->isStatic())
+    {
+	access_ret = smember->prot();
+    }
+    return access_ret;
+}
+
+enum PROT ClassDeclaration::getAccess(Dsymbol *smember)
+{
+    enum PROT access_ret = PROTnone;
+
+#if LOG
+    printf("+ClassDeclaration::getAccess(this = '%s', smember = '%s')\n",
+	toChars(), smember->toChars());
+#endif
+    if (smember->toParent() == this)
+    {
+	access_ret = smember->prot();
+    }
+    else
+    {
+	enum PROT access;
+	int i;
+
+	if (smember->isDeclaration()->isStatic())
+	{
+	    access_ret = smember->prot();
+	}
+
+	for (i = 0; i < baseclasses.dim; i++)
+	{   BaseClass *b = (BaseClass *)baseclasses.data[i];
+
+	    access = b->base->getAccess(smember);
+	    switch (access)
+	    {
+		case PROTnone:
+		    break;
+
+		case PROTprivate:
+		    access = PROTnone;	// private members of base class not accessible
+		    break;
+
+		case PROTpackage:
+		case PROTprotected:
+		case PROTpublic:
+		case PROTexport:
+		    // If access is to be tightened
+		    if (b->protection < access)
+			access = b->protection;
+
+		    // Pick path with loosest access
+		    if (access > access_ret)
+			access_ret = access;
+		    break;
+
+		default:
+		    assert(0);
+	    }
+	}
+    }
+#if LOG
+    printf("-ClassDeclaration::getAccess(this = '%s', smember = '%s') = %d\n",
+	toChars(), smember->toChars(), access_ret);
+#endif
+    return access_ret;
+}
+
+/********************************************************
+ * Helper function for ClassDeclaration::accessCheck()
+ * Returns:
+ *	0	no access
+ * 	1	access
+ */
+
+static int accessCheckX(
+	Dsymbol *smember,
+	Dsymbol *sfunc,
+	AggregateDeclaration *dthis,
+	AggregateDeclaration *cdscope)
+{
+    assert(dthis);
+
+#if 0
+    printf("accessCheckX for %s.%s in function %s() in scope %s\n",
+	dthis->toChars(), smember->toChars(),
+	sfunc ? sfunc->toChars() : "NULL",
+	cdscope ? cdscope->toChars() : "NULL");
+#endif
+    if (dthis->hasPrivateAccess(sfunc) ||
+	dthis->isFriendOf(cdscope))
+    {
+	if (smember->toParent() == dthis)
+	    return 1;
+	else
+	{
+	    ClassDeclaration *cdthis = dthis->isClassDeclaration();
+	    if (cdthis)
+	    {
+		for (int i = 0; i < cdthis->baseclasses.dim; i++)
+		{   BaseClass *b = (BaseClass *)cdthis->baseclasses.data[i];
+		    enum PROT access;
+
+		    access = b->base->getAccess(smember);
+		    if (access >= PROTprotected ||
+			accessCheckX(smember, sfunc, b->base, cdscope)
+		       )
+			return 1;
+
+		}
+	    }
+	}
+    }
+    else
+    {
+	if (smember->toParent() != dthis)
+	{
+	    ClassDeclaration *cdthis = dthis->isClassDeclaration();
+	    if (cdthis)
+	    {
+		for (int i = 0; i < cdthis->baseclasses.dim; i++)
+		{   BaseClass *b = (BaseClass *)cdthis->baseclasses.data[i];
+
+		    if (accessCheckX(smember, sfunc, b->base, cdscope))
+			return 1;
+		}
+	    }
+	}
+    }
+    return 0;
+}
+
+/*******************************
+ * Do access check for member of this class, this class being the
+ * type of the 'this' pointer used to access smember.
+ */
+
+void AggregateDeclaration::accessCheck(Loc loc, Scope *sc, Dsymbol *smember)
+{
+    int result;
+
+    FuncDeclaration *f = sc->func;
+    AggregateDeclaration *cdscope = sc->getStructClassScope();
+    enum PROT access;
+
+#if LOG
+    printf("AggregateDeclaration::accessCheck() for %s.%s in function %s() in scope %s\n",
+	toChars(), smember->toChars(),
+	f ? f->toChars() : NULL,
+	cdscope ? cdscope->toChars() : NULL);
+#endif
+
+    Dsymbol *smemberparent = smember->toParent();
+    if (!smemberparent || !smemberparent->isAggregateDeclaration())
+    {
+#if LOG
+	printf("not an aggregate member\n");
+#endif
+	return;				// then it is accessible
+    }
+
+    // BUG: should enable this check
+    //assert(smember->parent->isBaseOf(this, NULL));
+
+    if (smemberparent == this)
+    {	enum PROT access = smember->prot();
+
+	result = access >= PROTpublic ||
+		hasPrivateAccess(f) ||
+		isFriendOf(cdscope) ||
+		(access == PROTpackage && hasPackageAccess(sc, this));
+#if LOG
+	printf("result1 = %d\n", result);
+#endif
+    }
+    else if ((access = this->getAccess(smember)) >= PROTpublic)
+    {
+	result = 1;
+#if LOG
+	printf("result2 = %d\n", result);
+#endif
+    }
+    else if (access == PROTpackage && hasPackageAccess(sc, this))
+    {
+	result = 1;
+#if LOG
+	printf("result3 = %d\n", result);
+#endif
+    }
+    else
+    {
+	result = accessCheckX(smember, f, this, cdscope);
+#if LOG
+	printf("result4 = %d\n", result);
+#endif
+    }
+    if (!result)
+    {
+	error(loc, "member %s is not accessible", smember->toChars());
+    }
+}
+
+/****************************************
+ * Determine if this is the same or friend of cd.
+ */
+
+int AggregateDeclaration::isFriendOf(AggregateDeclaration *cd)
+{
+#if LOG
+    printf("AggregateDeclaration::isFriendOf(this = '%s', cd = '%s')\n", toChars(), cd ? cd->toChars() : "null");
+#endif
+    if (this == cd)
+	return 1;
+
+    // Friends if both are in the same module
+    //if (toParent() == cd->toParent())
+    if (cd && getModule() == cd->getModule())
+    {
+#if LOG
+	printf("\tin same module\n");
+#endif
+	return 1;
+    }
+
+#if LOG
+    printf("\tnot friend\n");
+#endif
+    return 0;
+}
+
+/****************************************
+ * Determine if scope sc has package level access to s.
+ */
+
+int hasPackageAccess(Scope *sc, Dsymbol *s)
+{
+#if LOG
+    printf("hasPackageAccess(s = '%s', sc = '%p')\n", s->toChars(), sc);
+#endif
+
+    for (; s; s = s->parent)
+    {
+	if (s->isPackage() && !s->isModule())
+	    break;
+    }
+#if LOG
+    if (s)
+	printf("\tthis is in package '%s'\n", s->toChars());
+#endif
+
+    if (s && s == sc->module->parent)
+    {
+#if LOG
+	printf("\ts is in same package as sc\n");
+#endif
+	return 1;
+    }
+
+
+#if LOG
+    printf("\tno package access\n");
+#endif
+    return 0;
+}
+
+/**********************************
+ * Determine if smember has access to private members of this declaration.
+ */
+
+int AggregateDeclaration::hasPrivateAccess(Dsymbol *smember)
+{
+    if (smember)
+    {	AggregateDeclaration *cd = NULL;
+	Dsymbol *smemberparent = smember->toParent();
+	if (smemberparent)
+	    cd = smemberparent->isAggregateDeclaration();
+
+#if LOG
+	printf("AggregateDeclaration::hasPrivateAccess(class %s, member %s)\n",
+		toChars(), smember->toChars());
+#endif
+
+	if (this == cd)		// smember is a member of this class
+	{
+#if LOG
+	    printf("\tyes 1\n");
+#endif
+	    return 1;		// so we get private access
+	}
+
+	// If both are members of the same module, grant access
+	while (1)
+	{   Dsymbol *sp = smember->toParent();
+	    if (sp->isFuncDeclaration() && smember->isFuncDeclaration())
+		smember = sp;
+	    else
+		break;
+	}
+	if (!cd && toParent() == smember->toParent())
+	{
+#if LOG
+	    printf("\tyes 2\n");
+#endif
+	    return 1;
+	}
+	if (!cd && getModule() == smember->getModule())
+	{
+#if LOG
+	    printf("\tyes 3\n");
+#endif
+	    return 1;
+	}
+    }
+#if LOG
+    printf("\tno\n");
+#endif
+    return 0;
+}
+
+/****************************************
+ * Check access to d for expression e.d
+ */
+
+void accessCheck(Loc loc, Scope *sc, Expression *e, Declaration *d)
+{
+#if LOG
+    if (e)
+    {	printf("accessCheck(%s . %s)\n", e->toChars(), d->toChars());
+	printf("\te->type = %s\n", e->type->toChars());
+    }
+    else
+    {
+	//printf("accessCheck(%s)\n", d->toChars());
+    }
+#endif
+    if (!e)
+    {
+	if (d->prot() == PROTprivate && d->getModule() != sc->module ||
+	    d->prot() == PROTpackage && !hasPackageAccess(sc, d))
+
+	    error(loc, "%s %s.%s is not accessible from %s",
+		d->kind(), d->getModule()->toChars(), d->toChars(), sc->module->toChars());
+    }
+    else if (e->type->ty == Tclass)
+    {   // Do access check
+	ClassDeclaration *cd;
+
+	cd = (ClassDeclaration *)(((TypeClass *)e->type)->sym);
+#if 1
+	if (e->op == TOKsuper)
+	{   ClassDeclaration *cd2;
+
+	    cd2 = sc->func->toParent()->isClassDeclaration();
+	    if (cd2)
+		cd = cd2;
+	}
+#endif
+	cd->accessCheck(loc, sc, d);
+    }
+    else if (e->type->ty == Tstruct)
+    {   // Do access check
+	StructDeclaration *cd;
+
+	cd = (StructDeclaration *)(((TypeStruct *)e->type)->sym);
+	cd->accessCheck(loc, sc, d);
+    }
+}

File d/dmd/aggregate.h

-
-// Compiler implementation of the D programming language
-// Copyright (c) 1999-2008 by Digital Mars
-// All Rights Reserved
-// written by Walter Bright
-// http://www.digitalmars.com
-// License for redistribution is by either the Artistic License
-// in artistic.txt, or the GNU General Public License in gnu.txt.
-// See the included readme.txt for details.
-
-#ifndef DMD_AGGREGATE_H
-#define DMD_AGGREGATE_H
-
-#ifdef __DMC__
-#pragma once
-#endif /* __DMC__ */
-
-#include "root.h"
-#include "dsymbol.h"
-
-struct Identifier;
-struct Type;
-struct TypeFunction;
-struct Expression;
-struct FuncDeclaration;
-struct CtorDeclaration;
-struct DtorDeclaration;
-struct InvariantDeclaration;
-struct NewDeclaration;
-struct DeleteDeclaration;
-struct InterfaceDeclaration;
-struct ClassInfoDeclaration;
-struct VarDeclaration;
-struct dt_t;
-
-
-struct AggregateDeclaration : ScopeDsymbol
-{
-    Type *type;
-    unsigned storage_class;
-    enum PROT protection;
-    Type *handle;		// 'this' type
-    target_size_t structsize;	// size of struct
-    target_size_t alignsize;		// size of struct for alignment purposes
-    target_size_t structalign;	// struct member alignment in effect
-    int hasUnions;		// set if aggregate has overlapping fields
-    Array fields;		// VarDeclaration fields
-    unsigned sizeok;		// set when structsize contains valid data
-				// 0: no size
-				// 1: size is correct
-				// 2: cannot determine size; fwd referenced
-    int isdeprecated;		// !=0 if deprecated
-    Scope *scope;		// !=NULL means context to use
-
-    // Special member functions
-    InvariantDeclaration *inv;		// invariant
-    NewDeclaration *aggNew;		// allocator
-    DeleteDeclaration *aggDelete;	// deallocator
-
-    FuncDeclarations dtors;	// Array of destructors
+
+// Compiler implementation of the D programming language
+// Copyright (c) 1999-2008 by Digital Mars
+// All Rights Reserved
+// written by Walter Bright
+// http://www.digitalmars.com
+// License for redistribution is by either the Artistic License
+// in artistic.txt, or the GNU General Public License in gnu.txt.
+// See the included readme.txt for details.
+
+/* NOTE: This file has been patched from the original DMD distribution to
+   work with the GDC compiler.
+
+   Modified by David Friedman, December 2006
+*/
+
+#ifndef DMD_AGGREGATE_H
+#define DMD_AGGREGATE_H
+
+#ifdef __DMC__
+#pragma once
+#endif /* __DMC__ */
+
+#include "root.h"
+#include "dsymbol.h"
+
+struct Identifier;
+struct Type;
+struct TypeFunction;
+struct Expression;
+struct FuncDeclaration;
+struct CtorDeclaration;
+struct DtorDeclaration;
+struct InvariantDeclaration;
+struct NewDeclaration;
+struct DeleteDeclaration;
+struct InterfaceDeclaration;
+struct ClassInfoDeclaration;
+struct VarDeclaration;
+struct dt_t;
+
+
+struct AggregateDeclaration : ScopeDsymbol
+{
+    Type *type;
+    unsigned storage_class;
+    enum PROT protection;
+    Type *handle;		// 'this' type
+    target_size_t structsize;	// size of struct
+    target_size_t alignsize;	// size of struct for alignment purposes
+    target_size_t structalign;	// struct member alignment in effect
+    int hasUnions;		// set if aggregate has overlapping fields
+    Array fields;		// VarDeclaration fields
+    unsigned sizeok;		// set when structsize contains valid data
+				// 0: no size
+				// 1: size is correct
+				// 2: cannot determine size; fwd referenced
+    int isdeprecated;		// !=0 if deprecated
+    Scope *scope;		// !=NULL means context to use
+
+    // Special member functions
+    InvariantDeclaration *inv;		// invariant
+    NewDeclaration *aggNew;		// allocator
+    DeleteDeclaration *aggDelete;	// deallocator
+
+    FuncDeclarations dtors;	// Array of destructors
     FuncDeclaration *dtor;	// aggregate destructor
-    
-    Expressions * attributes;
-
-#ifdef IN_GCC
-    Array methods;              // flat list of all methods for debug information
-#endif
-
-    AggregateDeclaration(Loc loc, Identifier *id);
-    void semantic2(Scope *sc);
-    void semantic3(Scope *sc);
-    void inlineScan();
-    target_size_t size(Loc loc);
-    static void alignmember(target_size_t salign, target_size_t size, target_size_t *poffset);
-    Type *getType();
-    void addField(Scope *sc, VarDeclaration *v);
-    int isDeprecated();		// is aggregate deprecated?
-    FuncDeclaration *buildDtor(Scope *sc);
-
-    void emitComment(Scope *sc);
-    void toDocBuffer(OutBuffer *buf);
-
-    // For access checking
-    virtual PROT getAccess(Dsymbol *smember);	// determine access to smember
-    int isFriendOf(AggregateDeclaration *cd);
-    int hasPrivateAccess(Dsymbol *smember);	// does smember have private access to members of this class?
-    void accessCheck(Loc loc, Scope *sc, Dsymbol *smember);
-
-    enum PROT prot();
-
-    // Back end
-    Symbol *stag;		// tag symbol for debug data
-    Symbol *sinit;
-    Symbol *toInitializer();
-
-    AggregateDeclaration *isAggregateDeclaration() { return this; }
-};
-
-struct AnonymousAggregateDeclaration : AggregateDeclaration
-{
-    AnonymousAggregateDeclaration()
-	: AggregateDeclaration(0, NULL)
-    {
-    }
-
-    AnonymousAggregateDeclaration *isAnonymousAggregateDeclaration() { return this; }
-};
-
-struct StructDeclaration : AggregateDeclaration
-{
-    int zeroInit;		// !=0 if initialize with 0 fill
-#if V2
-    int hasIdentityAssign;	// !=0 if has identity opAssign
-    FuncDeclaration *cpctor;	// generated copy-constructor, if any
-
-    FuncDeclarations postblits;	// Array of postblit functions
-    FuncDeclaration *postblit;	// aggregate postblit
-#endif
-
-    StructDeclaration(Loc loc, Identifier *id);
-    Dsymbol *syntaxCopy(Dsymbol *s);
-    void semantic(Scope *sc);
-    void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
-    char *mangle();
-    char *kind();
-    Expression *cloneMembers();
-    void toDocBuffer(OutBuffer *buf);
-
-    PROT getAccess(Dsymbol *smember);	// determine access to smember
-
-    void toObjFile(int multiobj);			// compile to .obj file
-    void toDt(dt_t **pdt);
-    void toDebug();			// to symbolic debug info
-
-    StructDeclaration *isStructDeclaration() { return this; }
-};
-
-struct UnionDeclaration : StructDeclaration
-{
-    UnionDeclaration(Loc loc, Identifier *id);
-    Dsymbol *syntaxCopy(Dsymbol *s);
-    char *kind();
-
-    UnionDeclaration *isUnionDeclaration() { return this; }
-};
-
-struct BaseClass
-{
-    Type *type;				// (before semantic processing)
-    enum PROT protection;		// protection for the base interface
-
-    ClassDeclaration *base;
-    target_ptrdiff_t offset;				// 'this' pointer offset
-    Array vtbl;				// for interfaces: Array of FuncDeclaration's
-					// making up the vtbl[]
-
-    int baseInterfaces_dim;
-    BaseClass *baseInterfaces;		// if BaseClass is an interface, these
-					// are a copy of the InterfaceDeclaration::interfaces
-
-    BaseClass();
-    BaseClass(Type *type, enum PROT protection);
-
-    int fillVtbl(ClassDeclaration *cd, Array *vtbl, int newinstance);
-    void copyBaseInterfaces(BaseClasses *);
-};
-
-extern int CLASSINFO_SIZE;
-
-struct ClassDeclaration : AggregateDeclaration
-{
-    static ClassDeclaration *object;
-    static ClassDeclaration *classinfo;
-
-    ClassDeclaration *baseClass;	// NULL only if this is Object
-    CtorDeclaration *ctor;
-    CtorDeclaration *defaultCtor;	// default constructor
-    FuncDeclaration *staticCtor;
-    FuncDeclaration *staticDtor;
-    Array vtbl;				// Array of FuncDeclaration's making up the vtbl[]
-    Array vtblFinal;			// More FuncDeclaration's that aren't in vtbl[]
-
-    BaseClasses baseclasses;		// Array of BaseClass's; first is super,
-					// rest are Interface's
-
-    int interfaces_dim;
-    BaseClass **interfaces;		// interfaces[interfaces_dim] for this class
-					// (does not include baseClass)
-
-    BaseClasses *vtblInterfaces;	// array of base interfaces that have
-					// their own vtbl[]
-
-    ClassInfoDeclaration *vclassinfo;	// the ClassInfo object for this ClassDeclaration
-    int com;				// !=0 if this is a COM class (meaning
-					// it derives from IUnknown)
-    int isauto;				// !=0 if this is an auto class
-    int isabstract;			// !=0 if abstract class
-
-    int isnested;			// !=0 if is nested
-    VarDeclaration *vthis;		// 'this' parameter if this class is nested
-
-    int inuse;				// to prevent recursive attempts
-
-    ClassDeclaration(Loc loc, Identifier *id, BaseClasses *baseclasses);
-    Dsymbol *syntaxCopy(Dsymbol *s);
-    void semantic(Scope *sc);
-    void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
-    int isBaseOf2(ClassDeclaration *cd);
-
-    #define OFFSET_RUNTIME 0x76543210
-    virtual int isBaseOf(ClassDeclaration *cd, target_ptrdiff_t *poffset);
-
-    Dsymbol *search(Loc, Identifier *ident, int flags);
-#if V2
-    int isFuncHidden(FuncDeclaration *fd);
-#endif
-    FuncDeclaration *findFunc(Identifier *ident, TypeFunction *tf);
-    void interfaceSemantic(Scope *sc);
-    int isNested();
-    int isCOMclass();
-    virtual int isCOMinterface();
-#if V2
-    virtual int isCPPinterface();
-#endif
-    int isAbstract();
-    virtual int vtblOffset();
-    char *kind();
-    char *mangle();
-    void toDocBuffer(OutBuffer *buf);
-
-    PROT getAccess(Dsymbol *smember);	// determine access to smember
-
-    void addLocalClass(ClassDeclarations *);
-
-    // Back end
-    void toObjFile(int multiobj);			// compile to .obj file
-    void toDebug();
-    unsigned baseVtblOffset(BaseClass *bc);
-    Symbol *toSymbol();
-    Symbol *toVtblSymbol();
-    void toDt(dt_t **pdt);
-    void toDt2(dt_t **pdt, ClassDeclaration *cd);
-
-    Symbol *vtblsym;
-
-    ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
-};
-
-struct InterfaceDeclaration : ClassDeclaration
-{
-#if V2
-    int cpp;				// !=0 if this is a C++ interface
-#endif
-    InterfaceDeclaration(Loc loc, Identifier *id, BaseClasses *baseclasses);
-    Dsymbol *syntaxCopy(Dsymbol *s);
-    void semantic(Scope *sc);
-    int isBaseOf(ClassDeclaration *cd, target_ptrdiff_t *poffset);
-    int isBaseOf(BaseClass *bc, target_ptrdiff_t *poffset);
-    char *kind();
-    int vtblOffset();
-#if V2
-    int isCPPinterface();
-#endif
-    virtual int isCOMinterface();
-
-    void toObjFile(int multiobj);			// compile to .obj file
-    Symbol *toSymbol();
-
-    InterfaceDeclaration *isInterfaceDeclaration() { return this; }
-};
-
-#endif /* DMD_AGGREGATE_H */
+
+    Expressions * attributes;   // GCC decl/type attributes
+#ifdef IN_GCC
+    Array methods;              // flat list of all methods for debug information
+#endif
+
+    AggregateDeclaration(Loc loc, Identifier *id);
+    void semantic2(Scope *sc);
+    void semantic3(Scope *sc);
+    void inlineScan();
+    target_size_t size(Loc loc);
+    static void alignmember(target_size_t salign, target_size_t size, target_size_t *poffset);
+    Type *getType();
+    void addField(Scope *sc, VarDeclaration *v);
+    int isDeprecated();		// is aggregate deprecated?
+    FuncDeclaration *buildDtor(Scope *sc);
+
+    void emitComment(Scope *sc);