Closed Bug 945563 Opened 6 years ago Closed 6 years ago

HeapAPI.h:51:23: error: C++ requires a type specifier for all declarations when building with 8 unified sources instead of 16

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: glandium, Assigned: glandium)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Open python/mozbuild/mozbuild/backend/recursivemake.py, search for files_per_unification, replace its value (16) with 8.

This is the error you can get then:

../../dist/include/js/HeapAPI.h:51:23: error: C++ requires a type specifier for all declarations
static const uint32_t BLACK = 0;
                      ^~~~~
layout/base/nsCSSColorUtils.cpp:35:20: note: expanded from macro 'BLACK'
#define BLACK      NS_RGB(0, 0, 0)
                   ^~~~~~~~~~~~~~~

Interestingly, nsCSSColorUtils.cpp doesn't even use BLACK.
There are two ways to fix this:
- Remove the unused macro
- Replace macros with static const variables.
(In reply to Mike Hommey [:glandium] from comment #1)
> There are two ways to fix this:
> - Remove the unused macro
> - Replace macros with static const variables.

We should definitely do the former (for BLACK and WHITE, both of which are unused).

The latter may be worthwhile too, but isn't necessary to fix this bug.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/a0b60b2d12f0
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.