always_inline incorrectly set when building with clang

VERIFIED FIXED in mozilla7

Status

()

Core
Build Config
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

Trunk
mozilla7
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 536604 [details] [diff] [review]
patch

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-
Created attachment 536677 [details] [diff] [review]
move declarations out of main
Attachment #536604 - Attachment is obsolete: true
Attachment #536677 - Flags: review?(mh+mozilla)
Attachment #536677 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
http://hg.mozilla.org/projects/cedar/rev/385822ac7499
Keywords: checkin-needed
Whiteboard: fixed-in-cedar
Pushed:
http://hg.mozilla.org/mozilla-central/rev/385822ac7499
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla7
Version: unspecified → Trunk

Updated

6 years ago
Assignee: nobody → respindola

Comment 5

6 years ago
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
You need to log in before you can comment on or make changes to this bug.