public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15339] New: function call error
@ 2004-05-07 15:03 MichaelLi8195 at hotmail dot com
  2004-05-07 15:30 ` [Bug c++/15339] " bangerth at dealii dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: MichaelLi8195 at hotmail dot com @ 2004-05-07 15:03 UTC (permalink / raw)
  To: gcc-bugs

//*******mytest.hpp******* 
#ifndef MYTEST_H 
#define MYTEST_H 
#include <iostream> 
#include <string> 
template<typename T>    //declaration 
void fun(T val, const std::string seperator); //error, change to 
                                         //seperator = " " , then it works well

template<typename T>    //definition 
void fun(T val, const std::string seperator = " ") 
{ 
    std::cout<<val<<seperator<<std::endl; 
} 
#endif 

//***********test.cpp********* 
#include "mytest.hpp" 
int main() 
{ 
   fun(10); 
}

g++ test.cpp -o test
and reads "test.cpp:4:error: no matching function for call to `fun(int)'".
I think the function should be resolved from its definition not its 
declaration the first one it encountered. It means that although no default 
argument is provided in function declaration, as long as it has one default in 
the definition, it should also work well.

-- 
           Summary: function call error
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: MichaelLi8195 at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
@ 2004-05-07 15:30 ` bangerth at dealii dot org
  2004-05-07 16:36   ` llewelly
  2004-05-07 15:37 ` bangerth at dealii dot org
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-05-07 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-07 15:30 -------
Confirmed, here is a smaller testcase: 
----------- 
template<typename> void fun(int); 
template<typename> void fun(int = 0) {}  
 
int main()  
{ fun(); } 
----------- 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:10: error: no matching function for call to `fun()' 
 
However, we get this from icc: 
g/x> icc -Xc -ansi x.cc 
x.cc(2): warning #845: specifying a default argument when redeclaring an 
unreferenced function template is nonstandard 
  template<typename> void fun(int = 0) {}  
                          ^ 
 
x.cc(5): error: no instance of function template "fun" matches the argument 
list 
  { fun(); } 
    ^ 
 
compilation aborted for x.cc (code 2) 
 
 
So it seems that this is wrong code. Someone will have to look up the exact 
text in the standard though. I find it odd that this only applies to  
templates, not to non-template functions. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
  2004-05-07 15:30 ` [Bug c++/15339] " bangerth at dealii dot org
@ 2004-05-07 15:37 ` bangerth at dealii dot org
  2004-05-07 16:24   ` Gabriel Dos Reis
  2004-05-07 16:24 ` gdr at integrable-solutions dot net
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-05-07 15:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-07 15:37 -------
Actually, that was easy. 8.3.6/4 specificly says 
  For non-template functions, default arguments can be added in later 
  declarations. 
 
So the code is invalid. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Bug c++/15339] function call error
  2004-05-07 15:37 ` bangerth at dealii dot org
@ 2004-05-07 16:24   ` Gabriel Dos Reis
  0 siblings, 0 replies; 16+ messages in thread
From: Gabriel Dos Reis @ 2004-05-07 16:24 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Actually, that was easy. 8.3.6/4 specificly says 
|   For non-template functions, default arguments can be added in later 
|   declarations. 
|  
| So the code is invalid. 

Yes, you're right.  But we should be diagnosing the declaration
in the first place -- which we fail.  So there is an issue here, but
not that one the submitter thought about.

-- Gaby


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
  2004-05-07 15:30 ` [Bug c++/15339] " bangerth at dealii dot org
  2004-05-07 15:37 ` bangerth at dealii dot org
@ 2004-05-07 16:24 ` gdr at integrable-solutions dot net
  2004-05-07 16:36 ` llewelly at xmission dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-05-07 16:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-05-07 16:24 -------
Subject: Re:  function call error

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Actually, that was easy. 8.3.6/4 specificly says 
|   For non-template functions, default arguments can be added in later 
|   declarations. 
|  
| So the code is invalid. 

Yes, you're right.  But we should be diagnosing the declaration
in the first place -- which we fail.  So there is an issue here, but
not that one the submitter thought about.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (2 preceding siblings ...)
  2004-05-07 16:24 ` gdr at integrable-solutions dot net
@ 2004-05-07 16:36 ` llewelly at xmission dot com
  2004-05-07 16:54 ` bangerth at dealii dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: llewelly at xmission dot com @ 2004-05-07 16:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From llewelly at xmission dot com  2004-05-07 16:36 -------
Subject: Re:  function call error

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> ------- Additional Comments From bangerth at dealii dot org  2004-05-07 15:30 -------
> Confirmed, here is a smaller testcase: 
> ----------- 
> template<typename> void fun(int); 
> template<typename> void fun(int = 0) {}  
>  
> int main()  
> { fun(); } 
> ----------- 
>  
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
> x.cc: In function `int main()': 
> x.cc:10: error: no matching function for call to `fun()' 
>  
> However, we get this from icc: 
> g/x> icc -Xc -ansi x.cc 
> x.cc(2): warning #845: specifying a default argument when redeclaring an 
> unreferenced function template is nonstandard 
>   template<typename> void fun(int = 0) {}  
>                           ^ 
>  
> x.cc(5): error: no instance of function template "fun" matches the argument 
> list 
>   { fun(); } 
>     ^ 
>  
> compilation aborted for x.cc (code 2) 
>  
>  
> So it seems that this is wrong code. Someone will have to look up the exact 
> text in the standard though. I find it odd that this only applies to  
> templates, not to non-template functions.

It's in 8.3.6/4 . But see issue 226:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#226

Basicly, it's a leftover from when there was no way to explicitly
    specifiy template arguments for function templates. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Bug c++/15339] function call error
  2004-05-07 15:30 ` [Bug c++/15339] " bangerth at dealii dot org
@ 2004-05-07 16:36   ` llewelly
  0 siblings, 0 replies; 16+ messages in thread
From: llewelly @ 2004-05-07 16:36 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> ------- Additional Comments From bangerth at dealii dot org  2004-05-07 15:30 -------
> Confirmed, here is a smaller testcase: 
> ----------- 
> template<typename> void fun(int); 
> template<typename> void fun(int = 0) {}  
>  
> int main()  
> { fun(); } 
> ----------- 
>  
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
> x.cc: In function `int main()': 
> x.cc:10: error: no matching function for call to `fun()' 
>  
> However, we get this from icc: 
> g/x> icc -Xc -ansi x.cc 
> x.cc(2): warning #845: specifying a default argument when redeclaring an 
> unreferenced function template is nonstandard 
>   template<typename> void fun(int = 0) {}  
>                           ^ 
>  
> x.cc(5): error: no instance of function template "fun" matches the argument 
> list 
>   { fun(); } 
>     ^ 
>  
> compilation aborted for x.cc (code 2) 
>  
>  
> So it seems that this is wrong code. Someone will have to look up the exact 
> text in the standard though. I find it odd that this only applies to  
> templates, not to non-template functions.

It's in 8.3.6/4 . But see issue 226:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#226

Basicly, it's a leftover from when there was no way to explicitly
    specifiy template arguments for function templates. 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (3 preceding siblings ...)
  2004-05-07 16:36 ` llewelly at xmission dot com
@ 2004-05-07 16:54 ` bangerth at dealii dot org
  2004-05-08 16:29 ` giovannibajo at libero dot it
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-05-07 16:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-07 16:54 -------
I fail to see the relevance of the DR to the present case. It doesn't 
say anything about default arguments for repeated declarations, does 
it? 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] function call error
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (4 preceding siblings ...)
  2004-05-07 16:54 ` bangerth at dealii dot org
@ 2004-05-08 16:29 ` giovannibajo at libero dot it
  2004-05-08 16:32 ` [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden giovannibajo at libero dot it
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: giovannibajo at libero dot it @ 2004-05-08 16:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-05-08 16:29 -------
Reopened before there is an issue

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (5 preceding siblings ...)
  2004-05-08 16:29 ` giovannibajo at libero dot it
@ 2004-05-08 16:32 ` giovannibajo at libero dot it
  2004-05-09 14:19 ` MichaelLi8195 at hotmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: giovannibajo at libero dot it @ 2004-05-08 16:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-05-08 16:32 -------
This should be diagnosed:

------------------------------------
template<typename> void fun(int); 
template<typename> void fun(int = 0) {}  
------------------------------------

but it's not. I don't think it's a regression, but can anybody check?

Also, DR217 (TC1 status) says that this is also for regular member function of 
class templates. In other words, the following is invalid as well:

------------------------------------
    template <class T>
    struct S
    {
	void foo (int);
    };

    template <class T>
    void S<T>::foo (int = 0) { }
------------------------------------
(note that this testcase is already in our testsuite: g++.dg/tc1/dr217.C)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
      Known to fail|                            |3.4.0 3.5.0
            Summary|function call error         |[DR217] Adding default
                   |                            |arguments to function
                   |                            |templates in redeclartions
                   |                            |should be forbidden


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (6 preceding siblings ...)
  2004-05-08 16:32 ` [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden giovannibajo at libero dot it
@ 2004-05-09 14:19 ` MichaelLi8195 at hotmail dot com
  2004-05-09 15:18 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: MichaelLi8195 at hotmail dot com @ 2004-05-09 14:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From MichaelLi8195 at hotmail dot com  2004-05-09 14:17 -------
Subject: RE:  [DR217] Adding default arguments to function templates in
 redeclartions should be forbidden

I could not find "g++.dg/tc1/dr217.C" in the testsuite of the recently 
released package gcc-3.4.0.tar.bz2. Where could I get it? Thanks.


>From: "giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org>
>Reply-To: gcc-bugzilla@gcc.gnu.org
>To: MichaelLi8195@hotmail.com
>Subject: [Bug c++/15339] [DR217] Adding default arguments to function 
templates in redeclartions should be forbidden
>Date: 8 May 2004 16:32:58 -0000
>
>------- Additional Comments From giovannibajo at libero dot it  2004-05-08 
16:32 -------
>This should be diagnosed:
>
>------------------------------------
>template<typename> void fun(int);
>template<typename> void fun(int = 0) {}
>------------------------------------
>
>but it's not. I don't think it's a regression, but can anybody check?
>
>Also, DR217 (TC1 status) says that this is also for regular member 
function of
>class templates. In other words, the following is invalid as well:
>
>------------------------------------
>     template <class T>
>     struct S
>     {
>	void foo (int);
>     };
>
>     template <class T>
>     void S<T>::foo (int = 0) { }
>------------------------------------
>(note that this testcase is already in our testsuite: g++.dg/tc1/dr217.C)
>
>
>--
>            What    |Removed                     |Added
>----------------------------------------------------------------------------

>            Keywords|                            |accepts-invalid
>       Known to fail|                            |3.4.0 3.5.0
>             Summary|function call error         |[DR217] Adding default
>                    |                            |arguments to function
>                    |                            |templates in 
redeclartions
>                    |                            |should be forbidden
>
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (7 preceding siblings ...)
  2004-05-09 14:19 ` MichaelLi8195 at hotmail dot com
@ 2004-05-09 15:18 ` bangerth at dealii dot org
  2004-07-13 20:13 ` giovannibajo at libero dot it
  2004-07-13 20:14 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-05-09 15:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-09 15:18 -------
No, it's not a regression -- we never detected this at least back to 
2.95. 
 
With respect to the testcase: they only seem to be in the CVS archive 
since after the 3.4 branch was created. Giovanni added these files on 
2004/02/17. They are not present on the 3.4 branch. 
 
W. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-09 15:18:22
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (8 preceding siblings ...)
  2004-05-09 15:18 ` bangerth at dealii dot org
@ 2004-07-13 20:13 ` giovannibajo at libero dot it
  2004-07-13 20:14 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 16+ messages in thread
From: giovannibajo at libero dot it @ 2004-07-13 20:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-07-13 20:13 -------
*** Bug 11540 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philippe dot haution at
                   |                            |mines-paris dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
  2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
                   ` (9 preceding siblings ...)
  2004-07-13 20:13 ` giovannibajo at libero dot it
@ 2004-07-13 20:14 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 16+ messages in thread
From: giovannibajo at libero dot it @ 2004-07-13 20:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-07-13 20:14 -------
PR 11827 contains a small patch for this bug by Jakub, but it doesn't look OK 
(it wait for instantiation).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
       [not found] <bug-15339-8489@http.gcc.gnu.org/bugzilla/>
  2006-06-27 14:57 ` pinskia at gcc dot gnu dot org
@ 2010-02-12 19:57 ` jakub at gcc dot gnu dot org
  1 sibling, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-12 19:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jakub at gcc dot gnu dot org  2010-02-12 19:56 -------
default3.C g4 test has been XFAILed, for details see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43033#c3


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden
       [not found] <bug-15339-8489@http.gcc.gnu.org/bugzilla/>
@ 2006-06-27 14:57 ` pinskia at gcc dot gnu dot org
  2010-02-12 19:57 ` jakub at gcc dot gnu dot org
  1 sibling, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-27 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2006-06-27 14:47 -------
*** Bug 28179 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbowler at ca dot ibm dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-02-12 19:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 15:03 [Bug c++/15339] New: function call error MichaelLi8195 at hotmail dot com
2004-05-07 15:30 ` [Bug c++/15339] " bangerth at dealii dot org
2004-05-07 16:36   ` llewelly
2004-05-07 15:37 ` bangerth at dealii dot org
2004-05-07 16:24   ` Gabriel Dos Reis
2004-05-07 16:24 ` gdr at integrable-solutions dot net
2004-05-07 16:36 ` llewelly at xmission dot com
2004-05-07 16:54 ` bangerth at dealii dot org
2004-05-08 16:29 ` giovannibajo at libero dot it
2004-05-08 16:32 ` [Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden giovannibajo at libero dot it
2004-05-09 14:19 ` MichaelLi8195 at hotmail dot com
2004-05-09 15:18 ` bangerth at dealii dot org
2004-07-13 20:13 ` giovannibajo at libero dot it
2004-07-13 20:14 ` giovannibajo at libero dot it
     [not found] <bug-15339-8489@http.gcc.gnu.org/bugzilla/>
2006-06-27 14:57 ` pinskia at gcc dot gnu dot org
2010-02-12 19:57 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).