Closed Bug 661145 Opened 9 years ago Closed 9 years ago

always_inline incorrectly set when building with clang

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED
mozilla7

People

(Reporter: espindola, Assigned: espindola)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
AC_TRY_COMPILE expands into main with the user provide code in it. In this case, it looks like

int main(void) {
inline void f(void) __attribute__((always_inline));
}

This fails with

test.cc:2:1: error: inline declaration of 'f' not allowed in block scope
inline void f(void) __attribute__((always_inline));
^~~~~~
1 error generated.
Attachment #536604 - Flags: review?(mh+mozilla)
Comment on attachment 536604 [details] [diff] [review]
patch

Why not just move the declaration into the first block of AC_TRY_COMPILE where it belongs?
Attachment #536604 - Flags: review?(mh+mozilla) → review-
Attachment #536604 - Attachment is obsolete: true
Attachment #536677 - Flags: review?(mh+mozilla)
Attachment #536677 - Flags: review?(mh+mozilla) → review+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/385822ac7499
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla7
Version: unspecified → Trunk
Assignee: nobody → respindola
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0

I visually inspected the code changes. Marking as Verified Fixed as per bug 659997 Comment 7.
Status: RESOLVED → VERIFIED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.