Build warning: there are no arguments to ‘_’ that depend on a template parameter

Bug #666175 reported by Olorin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
Invalid
Undecided
Unassigned
LinuxDC++
Fix Released
Low
Steven Sheehy

Bug Description

subj

Revision history for this message
Olorin (vivliofika) wrote :
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

./dcpp/Streams.h:140: warning: there are no arguments to ‘_’ that depend on a template parameter, so a declaration of ‘_’ must be available

That warning has been there forever and is not that easy to fix. But marking confirmed anyway to track it and in the hope that someone else fixes it. :)

Changed in linuxdcpp:
importance: Undecided → Low
status: New → Confirmed
summary: - got some warnings building the dc
+ Build warning: there are no arguments to ‘_’ that depend on a template
+ parameter
tags: added: build warning
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Committed a fix to dcplusplus.

tags: added: core
Changed in dcplusplus:
assignee: nobody → Steven Sheehy (steven-sheehy)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
poy (poy) wrote :

that '_' is a #define normally replaced at compile time; that the compiler is actually trying to match it as some valid token shows that the file that #defines '_', DCPlusPlus.h, has not been included.
this is most likely a case of including stdinc.h but not DCPlusPlus.h; i suggest you modify your precompiled headers to include both stdinc.h & DCPlusPlus.h (see the top of win32/stdafx.h).

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

We do include stdinc.h before DCPlusPlus.h. This error started occurring after we merged .705 or 707 in awhile ago. We had to add -fpermissive in order to ignore the error and just make it a warning. I know '_' is gettext and is already defined by the time Streams.h is processed. I know this since if I add #define _(x) x it warns that I'm redefining '_'. The issue is more nuanced than include order:

http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Hmm...nevermind. It is include order. :)

Since we don't (and won't) define BUILDING_DCPP for gui files, we need to include gettext.h before DCPlusPlus.h. Sorry for the mess.

Changed in dcplusplus:
assignee: Steven Sheehy (steven-sheehy) → nobody
importance: Low → Undecided
status: Fix Committed → Invalid
Revision history for this message
Olorin (vivliofika) wrote :

It still there... :(

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

It's only fixed in linuxdcpp-i18n branch for now.

Changed in linuxdcpp:
assignee: nobody → Steven Sheehy (steven-sheehy)
milestone: none → 1.1.0
status: Confirmed → Fix Committed
Changed in linuxdcpp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.